[rabbitmq-discuss] listing bindings for a queue

Vukasin Toroman vukasin at toroman.name
Thu Sep 23 09:33:13 BST 2010


Hi everyone,

I am using RabbitMQ as an underlying messaging infrastructure for my project and have run into a problem, and maybe someone on this list could point me in the right direction as to how to solve it:

My system has multiple nodes (physically distinct machines) which communicate using AMQP in a workflow. When the workflow is changed, the affected nodes are restarted and they reconnect to AMQP (rabbitmq) and declare their input queue and its bindings. In order to ensure that no unwanted (stale) subscriptions are still active I need to call "queue.unbind" on them. So far so good. BUT in order to do that I need to be able to list active bindings for a given queue. I wasn't able to find such method wether in the amqp spec nor in any of the API's. What am I missing? I can see this information by calling

	rabbitmqctl list_bindings

but that needs to be run as root and my code does not (and should not) have these privileges.
I keep thinking I must be missing something but I just can't seem to find the solution. Any help would be appreciated. The only other way would be to completely trash the queue but I would need to first get to persist the queued messages and reinject them, but this is a fairly ugly solution.

Best,
Vukasin


More information about the rabbitmq-discuss mailing list