[rabbitmq-discuss] Work on plugins
Simon MacMullen
simon at rabbitmq.com
Tue Sep 20 10:52:38 BST 2011
On 19/09/11 21:51, Alvaro Videla wrote:
> Something I noticed while playing with custom exchanges for RabbitMQ
> is that if you create them and later you remove the plugin without
> deleting the exchange then RabbitMQ won't start at all because the
> recovery process will fail since it can't find the custom exchange
> module.
Yeah, that's certainly a problem. As you might guess I bumped into this
several times developing the federation plugin.
> Wouldn't it be nice to have an "uninstall plugin" kind of command?
> Perhaps also in the same way you do -rabbit_boot_step(). declarations
> on your modules, you could add something like a
> -rabbit_uninstall_plugin(). declaration that could be executed to
> remove the plugin. Then it's up to the plugin developer to take care
> at this point of removing Mnesia entries and other stuff related to
> his plugin.
But I'm not sure that this is the solution. What if a plugin gets
uninstalled temporarily by mistake? That's far too easy to do at the
moment during an upgrade, and while the changes to the plugin system
should mitigate that *a lot* the idea that:
# rabbitmq-plugin uninstall rabbitmq_federation
# rabbitmq-plugin install rabbitmq_federation
could delete exchanges and bindings seems pretty alarming to me.
It seems that this is primarily an issue around exchange type plugins. I
wonder if we could just not recover exchanges that have an unrecognised
type? The trouble is, then you have a "hidden" exchange that will pop
back as soon as you reinstall the plugin, but without the plugin you
can't get rid of it, and attempts to redeclare it with a different type
will always fail. Hmm.
Cheers, Simon
--
Simon MacMullen
RabbitMQ, VMware
More information about the rabbitmq-discuss
mailing list