[rabbitmq-discuss] Is it possible to Query the Contents of Exchange or Queue in Rabbitmq?

Matthias Radestock matthias at lshift.net
Mon Feb 8 21:11:51 GMT 2010


Seema,

Seema Biradar wrote:
> Is it  possible that  at a given time can we Query the Queue or Exchange 
> to know which message (i.e Messgae content ) is residing in it?

This feature is also known as "queue browsing" and is something we are 
thinking about adding to RabbitMQ.

Meanwhile you can do the following:
- establish a new AMQP connection & channel
- drain all the messages from the queue using a consumer or basic.get
- close the channel without ack'ing the messages

The main difference between that and queue browsing is that
- the drained messages are not available to other consumers until the 
last step
- the order of the requeued messages may be different to what it was before


Regards,

Matthias.




More information about the rabbitmq-discuss mailing list