Connection lost between RabbitMQ and Consumer, but Consumer is alive

3,498 views
Skip to first unread message

f7s...@gmail.com

unread,
May 6, 2016, 2:05:21 PM5/6/16
to rabbitmq-users
Hi,
I have following configuration,
      
      Queues - durable
      Message - persistent and manual acknowledgement

If TCP connection lost between RabbitMQ and Consumer due to network failure but Consumer is active and processing the delivered messages,

      RabbitMQ treats consumer as dead and re-queues the messages, it doesn't actually care whether Consumer is really dead, correct ??
      If above is YES, is there any way to change this condition ??, like i wanted to customize as TCP connection lost + xxx_condition for treating Consumer as dead.

      My requirement is:  I don't want to process the message twice and not in favor of using cache/DB to store the state of the message, 


-- Thanks
                  

Michael Klishin

unread,
May 6, 2016, 7:23:19 PM5/6/16
to rabbitm...@googlegroups.com
Take a look at http://www.rabbitmq.com/heartbeats.html. The definition of "dead" as far as clients go
comes down to the setting above. Be careful about setting it too low (e.g. < 5 seconds).

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

vitaly numenta

unread,
May 7, 2016, 7:43:47 PM5/7/16
to rabbitmq-users
The best that you can do with AMQP and RabbitMQ is "at least once delivery". They don't offer "exactly once" guarantees. So, apps need to be prepared to deal with the same message being resent, anyway. For example, let's say that RabbitMQ sends a message to your consumer, and the consumer processes and ACKs the message, but the network connection is lost while the ACK is in transit. In this case, RabbitMQ will resend the message next time you consume from the queue, so your app will get the same message twice.

f7s...@gmail.com

unread,
May 10, 2016, 12:55:03 AM5/10/16
to rabbitmq-users
Thank you.
Reply all
Reply to author
Forward
0 new messages