[rabbitmq-discuss] listing bindings for a queue

Alvaro Videla videlalvaro at gmail.com
Thu Sep 23 09:41:35 BST 2010


A quick and dirty solution could be to modify the rabbitmqctl script and add there whatever the root /root/.erlang.cookie is

You could edit or create a new version of that script modifying the exec part:

exec erl \
    -pa "${RABBITMQ_HOME}/ebin" \
    -noinput \
    -hidden \
    ${RABBITMQ_CTL_ERL_ARGS} \
    -sname rabbitmqctl$$ \
    -s rabbit_control \
    -nodename $RABBITMQ_NODENAME \
    -setcookie COOKIEVALUE
    -extra "$@"

I've added this line there: -setcookie COOKIEVALUE

Another way to do that is to modify your local .erlang.cookie to be the same as the root one.

Regards,

Alvaro


On Sep 23, 2010, at 4:33 PM, Vukasin Toroman wrote:

> 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
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss



More information about the rabbitmq-discuss mailing list