[rabbitmq-discuss] How do I inspect the queue

Tony Garnock-Jones tonyg at lshift.net
Tue May 5 16:52:00 BST 2009


Hi,

Reddy, Rajesh (GPT EMEA) wrote:
> Iam using the RabbitMQ client for .NET . I have created a non durable
> and autodelete queue. When is the queue autodeleted and also how do I
> inspect a queue instance after declaring it.

Autodelete queues disappear once the last consumer consuming from them
is closed. (If no consumers are ever created on the queue, it won't be
deleted automatically, IIRC.) Since consumers are scoped to the lifetime
of a channel, which in turn is scoped to the lifetime of a TCP/IP
connection, then if you

 - connect
 - open a channel
 - create your autodelete queue
 - basic.consume from it
 - handle deliveries for a while
 - drop the connection, either cleanly or as the result of an error

then the queue will end up deleted.

Regarding inspection of the queue, what kinds of things are you
interested in? You might try "rabbitmqctl list_queues", and see if any
of the available info items meet your needs.

Regards,
  Tony
-- 
 [][][] Tony Garnock-Jones     | Mob: +44 (0)7905 974 211
   [][] LShift Ltd             | Tel: +44 (0)20 7729 7060
 []  [] http://www.lshift.net/ | Email: tonyg at lshift.net




More information about the rabbitmq-discuss mailing list