[rabbitmq-discuss] A question when using rabbitmq Thanks

Simon MacMullen simon at rabbitmq.com
Mon Aug 5 09:53:57 BST 2013

On 05/08/2013 09:15, Michael Klishin wrote:
> yby538 escribió:
>> I have declared a queuqe in memory,so how can i get the size of the
>> queue anytime?Is there some APIs we can use?(We have to use this
>> method in my project if it is possible)how can i check whether the
>> queue is empty or not?
> There are two ways: use basic.declare with passive = true and see
> message count on the response (basic.queue-ok), or use HTTP API [1].

You don't *have* to declare with passive = true, you get the same 
queue.declare-ok information back with passive = false.

Also there's a third way: "rabbitmqctl list_queues name messages" or 

Cheers, Simon

More information about the rabbitmq-discuss mailing list