[rabbitmq-discuss] RabbitMQ 1.7.0 close the cnx when consumer don't ack deliveries during 30s
Vincent Barat
vbarat at ubikod.com
Wed Jul 14 17:38:35 BST 2010
Concerning this issue, I've read about the basicQos() call.
Do you think that I can use this call to force the server to send me
a maximum of, say, 1000 messages that I could store in an array in
handleDelivery() (without blocking), and, once I've counted 1000
messages exactly, I trigger another thread to store all messages and
then ack all messages ?
Le 14/07/10 11:30, Simon MacMullen a écrit :
> On 13/07/10 16:00, Vincent Barat wrote:
> <snip>
>> But from time to time, the database blocks during 30s to 1minute and
>> thus I don't acknowledge during the same time.
>>
>> It seems that the RabbitMQ server closes the connection. Is there a
>> timeout (or a setting) I can use to fix this issue ?
>
> Hi Vincent. Not acking for 30s certainly should not close the
> connection. When the server closes a connection due to client
> error it sends an error message; you should see this as an
> IOException in the Java client. Check the ShutdownSignalException
> inside the IOException to get the error code / message.
> Alternatively you could look in the server logs, sometimes there's
> more detail there.
>
> One way this could be happening is:
>
> * You have heartbeating turned on (I think some of the client
> version have this turned on by default). Heartbeating makes the
> server periodically check the client is still alive and responding.
>
> * You block the connection main loop, say by implementing your own
> Consumer rather than using QueueingConsumer, and doing something
> slow / expensive in Consumer.handleDelivery().
>
> Does this sound plausible? If not I would look for error messages
> as above.
>
> Cheers, Simon
>
More information about the rabbitmq-discuss
mailing list