|
|
| Author |
Message |
< RabbitMQ mailing list ~ Reliable way to get number of messages in a queue |
| Guest |
Posted: Fri Oct 23, 2009 4:42 pm |
|
|
|
Guest
|
| I'm attempting to get the number of messages that are in a queue. |
|
|
| Back to top |
|
| Guest |
Posted: Fri Oct 23, 2009 5:18 pm |
|
|
|
Guest
|
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@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post received from mailinglist |
|
|
| Back to top |
|
| Guest |
Posted: Fri Oct 23, 2009 6:00 pm |
|
|
|
Guest
|
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@lshift.net (matthew@lshift.net)> wrote:
Quote: 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. |
|
|
| Back to top |
|
| Guest |
Posted: Fri Oct 23, 2009 9:10 pm |
|
|
|
Guest
|
Mark,
Mark Nutter wrote:
> Ahh.. I see now. So is there a way to tell how many messages the
> consumer currently has?
The server knows how many messages have been sent out to a consumer and
not acknowledged yet, and you can see that count, per queue, in the
messages_unacknowledged info item of 'rabbitmqctl list_queues'.
There is no way to get the same information via the protocol.
Regards,
Matthias.
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss@lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
Post received from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|