[rabbitmq-discuss] current queue size is always different with a real queue size. actually, it is always same with actual queue size - prefetch size.
Henry JunYoung Kim
henry.jykim at gmail.com
Fri Nov 16 07:27:24 GMT 2012
hi,
I am a newbie to use a rabbitmq.
currently, I am using it without no auto-ack mode.
manually, I send ack/nack after receiving messages from queues.
but, on this, I found that current queue size is always different with a
real queue size. actually, it is always same with actual queue size -
prefetch size.
here is my code to send.
channel.basicPublish(exchangeName, queueName, *null*, message);
System.out.println(channel.queueDeclarePassive(queueName).getMessageCount());
// for debugging
If I set the prefetchCount as 5. it prints out
0
0
0
0
0
1
2
3
4
.....
If I set it as 3, it prints out
0
0
0
1
2
3
4
..
How could I retrieve the correct queue size regardless of the prefetchCount.
thanks for your concerns.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20121115/157b8ab9/attachment.htm>
More information about the rabbitmq-discuss
mailing list