[rabbitmq-discuss] How can get the queue depth?

Michael Bridgen mikeb at rabbitmq.com
Thu Mar 3 09:26:42 GMT 2011


> I am using Java Client for Rabbitmq. I want know that how many messages are
> in the queue(total no. of message remaining in the queue) without reading
> the message of the queue.

Using a passive declare (Channel.queueDeclarePassive in the Java client) 
will give you the queue depth in the reply.

If you want to sample it often, it may be better to use the management 
plugin.

Michael.


More information about the rabbitmq-discuss mailing list