[rabbitmq-discuss] listing bindings for a queue

Alvaro Videla videlalvaro at gmail.com
Thu Sep 23 10:16:14 BST 2010


Well, 

You could execute the rabbit_control module remotely. Let me see If I can come up with a script to accomplish what you ask. I don't promise anything tough…

On Sep 23, 2010, at 5:06 PM, Vukasin Toroman wrote:

> but wouldn't they miss the RABBITMQ_HOME directory on the other machines if they had no rabbitmq server installed but only erlang? could i distribute a subset of rabbitmq's files to each node?
> 
> 
> 
> On Sep 23, 2010, at 10:51 , Alvaro Videla wrote:
> 
>> You could do the same with Erlang. It's what the rabbitmqctl is doing BTW.
>> 
>> With some tweaks you can make it work to connect to other nodes across the network. You'll need to share the erlang cookie.
>> 
>> On Sep 23, 2010, at 4:47 PM, Vukasin Toroman wrote:
>> 
>>> Thanks Alvaro,
>>> 
>>> this will help me greatly in the short term. In the long term I would like to move this responsibility to the nodes (which do not have rabbitmq installed) and would need some over-the-wire method of listing. Since my cluster is currently fairly small, I can live with the solution you proposed.
>>> 
>>> Thanx,
>>> Vukasin
>>> 
>>> 
>>> On Sep 23, 2010, at 10:41 , Alvaro Videla wrote:
>>> 
>>>> 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