[rabbitmq-discuss] Number of messages in a queue

Sharath sharathciddu at gmail.com
Thu Mar 6 20:02:15 GMT 2014


I am implementing a system where jobs are submitted to the RabbitMQ based 
'work queue' and the workers pick the jobs. 

However when the number of jobs in the queue are more than a certain 
number, I want to stop accepting any job submissions. I was wondering if 
there is any way using which we can get the number of messages/jobs in the 
queue and could you let me know the complexity of that call.

One idea is to using queue declare with passive as true, but I am not sure 
if this is the most optimal way to do it.

-Sharath
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140306/d7905092/attachment.html>


More information about the rabbitmq-discuss mailing list