[rabbitmq-discuss] Reliable way to get number of messages in a queue
Mark Nutter
marknutter at gmail.com
Fri Oct 23 18:59:46 BST 2009
Ahh.. I see now. So is there a way to tell how many messages the consumer
currently has?
On Fri, Oct 23, 2009 at 12:17 PM, Matthew Sackman <matthew at lshift.net>wrote:
> On Fri, Oct 23, 2009 at 11:41:46AM -0500, Mark Nutter wrote:
> > I'm attempting to get the number of messages that are in a queue. I'm
> using
> > a consumer to pull messages from the queue. I've tried using the
> > queueDeclare getMessageCount() function and that gives me the message
> count
> > *once* but every time after that it just gives me a message count of zero
> > back. Any other way of finding it? Is the consumer somehow messing
> things
> > up? Thanks!
>
> If the consumer has removed all the msgs from the queue, then the
> queueDeclare msg count will indeed be 0. The queueDeclare msg count only
> tells you the number of messages currently buffered in the queue.
>
> Matthew
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
--
Mark Nutter
612-205-1388
marknutter at gmail.com
http://nuttersmark.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20091023/0fb81e2e/attachment.htm
More information about the rabbitmq-discuss
mailing list