[rabbitmq-discuss] Reliable way to get number of messages in a queue

Michael Nacos m.nacos at gmail.com
Wed Nov 18 16:58:43 GMT 2009


Hi there,

I know there is nothing in the protocol supporting book-keeping information
such as queue lengths etc.
However, basic get ok returns a message count which is more or less correct,
except when consumers are
still attached to the queue (there's no connection closing until the very
end of the experiment, we are reusing
a few connections). I have been using rabbitmqctl to check to the queue
lengths and according to rabbitmqctl
the consumer processes do not keep up with the message generation rate but
the external poller process gets
a message count of zero. As soon as the consumers disconnect, message count
reports the right number of
unhandled messages again.

Is this something that you have seen before/would expect? My polling
strategy is: consume a single message
from a queue with no_ack=false, read the message count, send no ack and
disconnect.

regards, Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20091118/cf226472/attachment.htm 


More information about the rabbitmq-discuss mailing list