[rabbitmq-discuss] Consumer stop to receive messages but continue listening queue problem.

Matthias Radestock matthias at lshift.net
Fri Mar 26 11:08:39 GMT 2010


Gustavo,

Gustavo Aquino wrote:
> 1- Start RabbitMQ
> 2- Start 8 consumers in concurrent mode (8 consumers at same time).
> 3- Start producer
> 4- Fating queue with ~3000 messages per second having ~400bytes
> 5- When queue have ~170.000 stop consumers and producer
> 6- Start consumers in concurrent mode(8 consumers at same time)
> 
> After that, consumers are connected to Rabbit, but if you take a look 
> about queue consumers, we have only 3 or 4 consumers... all others are 
> waiting something but don't consume nothing.

You need to set a basic.qos prefetch limit, e.g. using
http://www.rabbitmq.com/releases/rabbitmq-java-client/v1.7.2/rabbitmq-java-client-javadoc-1.7.2/com/rabbitmq/client/Channel.html#basicQos(int,%20int,%20boolean). 
to place a limit on the number of messages the server will send to a 
client w/o waiting for acknowledgement. Otherwise, when the first 
consumer starts consuming from a queue it will get sent all the queue's 
messages (network capacity permitting).


Matthias.




More information about the rabbitmq-discuss mailing list