[rabbitmq-discuss] problem on queue depth checking?
trancos at gmail.com
Tue Mar 13 16:13:55 GMT 2012
Make sure autoack is set to false.
From Jose's iPhone
On Mar 13, 2012, at 6:47 AM, sameekmishra <sameek at arosys.com> wrote:
> Defining the channel.basicQos(1) consumer will pick one message and do not
> pick any message from queue until it not got acknowledgement,if u think that
> consumer will consume all message from queue that's because I got queue
> depth zero but This may not be the case as.
> What i am thinking is that we need to define channel.basicQos(1) only in the
> consumer code not in queueDepth because it only give the total count of
> Even after defining the channel.basicQos(1) on consumer end, I am getting
> queuedepth value 0,which should be one. may other reason behind that i am
> getting wrong result.
> Simon MacMullen-2 wrote:
>> On 13/03/12 13:01, sameekmishra wrote:
>>> Now if i publish 2 messages then one message will be consumed(and thread
>>> will sleep for one minute) and one will be in the queue;
>>> And queue depth checking thread must show the queuedepth = 1. But I am
>>> getting the queuedepth 0.
>>> But if we dont consume the message from queue then queuedepth is shown
>> RabbitMQ will by default push as many messages to the consumer as it
>> can. On the consumer side they end up buffered in the QueueingConsumer.
>> To change this behaviour, invoke channel.basicQos() and use acks. This
>> will bound the number of unacknowledged messages RabbitMQ will push to
>> your consumer.
>> Cheers, Simon
>> Simon MacMullen
>> RabbitMQ, VMware
>> rabbitmq-discuss mailing list
>> rabbitmq-discuss at lists.rabbitmq.com
> View this message in context: http://old.nabble.com/problem-on-queue-depth-checking--tp33494003p33494378.html
> Sent from the RabbitMQ mailing list archive at Nabble.com.
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
More information about the rabbitmq-discuss