[rabbitmq-discuss] Consumers stops to pick up messages after long inactivity

Emile Joubert emile at rabbitmq.com
Tue Jan 11 15:47:44 GMT 2011


Hi Neha,

On 10/01/11 21:57, Neha wrote:
> I have an application which uses rabbitmq. It has messages being sent
> from Monday to Friday and on the weekend there are no messages sent.
>
> The application works fine on regular days, i.e producers puts the
> message on the queue and the consumer receives the message. But every
> Monday, after the weekend the consumer starts behaving strangely. It
> stops receiving messages even though the queue has messages present.
> The heartbeat of the consumer all this time is working fine but it
> still doesn't receive all these messages on the queue. To overcome
> this problem I have to restart the consumers every Monday, and as soon
> as I do that, all the messages that are present in the queue starts
> getting consumed.
>
> Looking at a problem, I feel it might be due to inactivity during the
> weekend. I wanted to know if anyone else has faced this problem
> wherein the consumer stops consuming after a long duration of
> inactivity? Is there a setting to be tweaked to increase this period?

Long periods of inactivity should have no effect. The problem is almost 
certainly network-related. Here are some things to check.

Is there anything of interest in the broker logfile?

As there any device along the network path that might have caused the 
connections to be reset?

Does the broker consider the clients to be connected on Monday mornings? 
"rabbitmqctl list_connections" and "rabbitmqctl list_consumers" can help 
determine this. The logfile will show when any connections were 
terminated. Also verify the connection timeout (rabbitmqctl 
list_connections timeout).

You may want to try using a different connection heartbeat value and 
check whether the message consumers are able to recover from network 
interruptions automatically.


Regards

Emile



More information about the rabbitmq-discuss mailing list