[rabbitmq-discuss] Plugin startup behavior issue
Gavin M. Roy
gavinmroy at gmail.com
Tue Jun 17 04:47:52 BST 2014
I’ve been running into a weird issue with the pgsql_listen_exchange plugin code that I’ve been trying to fix.
If you start a fresh RabbitMQ install with an empty database and the plugin enabled, it will exit due to a no_such_vhost error for <<“/“>> in the rabbit_error_log module start/0. Logs:
What is odd about it, is if the database is not empty, that is rabbitmq is started before enabling the plugin, everything works just fine. This seems to be consistent with the default branch as well as with 3.3.0+. I’ve not tried earlier versions of RabbitMQ.
It seems it probably has something to do with the rabbit_boot_step ordering of my plugin combined with some logging somewhere in combination to the initial creation of the rabbitmq mnesia database, but I’m at a loss as to what’s going on beyond that.
If I change the plugin to run later in the boot step ordering (i.e. have in come in after recover), it works fine for the initial load, but then if I declare an exchange, it is not loaded soon enough to be there for the exchange to be recovered on boot.
From digging through pretty much everything I could find with boot steps, it seems that I should be able to require rabbit_registry and enable recover for the proper behavior.
I also have two other modules with boot steps, one is a mirrored_supervisor that enables the exchange and requires kernel_ready and the other is a rabbit_policy_validator that requires rabbit_registry and enables recovery.
Any pointers on how I can debug what condition my plugin is creating to cause this failure would be greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss