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

Michael Nacos m.nacos at gmail.com
Wed Nov 18 18:10:56 GMT 2009


thanks... more testing tomorrow

2009/11/18 Matthew Sackman <matthew at lshift.net>

> On Wed, Nov 18, 2009 at 05:18:53PM +0000, Matthew Sackman wrote:
> > That's odd. However, you're really much much better off using
> > queue.declare to redeclare the existing queue - the declare-ok that you
> > get back contains the number of messages in the queue. This is a much
> > neater strategy than below. I would recommend you switch to using this
> > and repeat your test.
>
> What's actually wrong with what you were doing is that the rabbitmqctl
> list_queues contains both the ready messages and the unack'd msgs (as
> well as uncommitted msgs). Thus if your consumers aren't acking msgs
> quickly enough (and have an unbounded qos setting) then it will appear
> that they're not keeping up. Use:
>
> rabbitmqctl list_queues name messages_ready messages_unacknowledged
>
> Matthew
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20091118/e658ea58/attachment.htm 


More information about the rabbitmq-discuss mailing list