[rabbitmq-discuss] List consumer connections/channels per queue

Simon MacMullen simon at rabbitmq.com
Thu Sep 6 16:34:28 BST 2012

I don't think it's convenient to do this from the command line, with 
either rabbitmqctl or rabbitmqadmin, but if you are driving the HTTP API 
directly it's easier. They key is that the HTTP API only adds consumer 
details to a queue when retrieving a single queue, not a list (since 
it's slightly expensive and not frequently called for).

So GET /api/<vhost>/<queue_name>, then look in consumer_details and for 
each item in the array there look in channel_details.connection_name and 
DELETE /api/connections/<connection_name>.

Cheers, Simon

On 06/09/2012 11:05AM, Tom Grange wrote:
> Hi,
> We need to kill all the consumer connections for only one queue through
> rabbitmqctl (the workers themselves are already dead) - but we need to
> be able to list only the connections for the one queue we are interested in.
> Though rabbitmqctl or the api you can list the queues and list the
> consumer connections separately but not filter the consumer connection
> list down by queues.
> Any idea how to do this?
> Thanks
> Tom
> Global Personals is a limited company registered in England and Wales.
> Registered number: 04880697
> Registered office: Minton Place, Victoria Street, Windsor, Berkshire,
> SL4 1EG, United Kingdom
> _______________________________________________
> 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