[rabbitmq-discuss] Is there a way to get all the queues for a channel ?

Gavin M. Roy gmr at myyearbook.com
Wed Apr 20 17:22:40 BST 2011


On Wednesday, April 20, 2011 at 12:08 PM, mysurf mail wrote:
can I get all the queues for a single channel ?
> 
> 


There is no construct in AMQP to fetch this information from the server, your client library may be able to return this to you. 

You could, if you know your connection data (ip address, connection port, channel number, etc) fetch this from the Management Plugin API. 

Where localhost is your RabbitMQ broker, http://localhost:55672/api/channels/ will list all channels and data about them. 

In addition you can query a specific channel like:

http://localhost:55672/api/channels/192.168.1.1:32211:1

Which will return the data in JSON format such as:

> {
> "connection_details": {
> "name": "192.168.1.1:32211",
> "peer_address": "192.168.1.1",
> "peer_port": 32211
> },
> "deliveries": [{
> "stats": {
> "deliver_get": 70248,
> "deliver_get_details": {
> "rate": 0.994233050613223,
> "last_event": 1303316165124
> },
> "deliver_no_ack": 70248,
> "deliver_no_ack_details": {
> "rate": 0.994233050613223,
> "last_event": 1303316165124
> }
> },
> "queue_details": {
> "name": "foo",
> "vhost": "/"
> },
> "queue": "<rabbit at rabbit07.3.4431.0>"
> }],
> "message_stats": {
> "deliver_get": 70248,
> "deliver_get_details": {
> "rate": 0.994233050613223,
> "last_event": 1303316165124
> },
> "deliver_no_ack": 70248,
> "deliver_no_ack_details": {
> "rate": 0.994233050613223,
> "last_event": 1303316165124
> }
> },
> "consumer_details": [{
> ...ommitted for message length...
> }],
> "transactional": false,
> "confirm": false,
> "consumer_count": 1,
> "messages_unacknowledged": 0,
> "messages_unconfirmed": 0,
> "acks_uncommitted": 0,
> "prefetch_count": 0,
> "client_flow_blocked": false,
> "name": "10.100.20.44:32211:1",
> "pid": "<rabbit at rabbit07.3.23178.1>",
> "node": "rabbit at rabbit07",
> "connection": "<rabbit at rabbit07.3.23175.1>",
> "number": 1,
> "user": "guest",
> "vhost": "/"
> }



Hope this helps,

Gavin 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20110420/1627044f/attachment.htm>


More information about the rabbitmq-discuss mailing list