[rabbitmq-discuss] Shutdown Listener on Java Client API
matthias at rabbitmq.com
Tue Sep 28 22:08:04 BST 2010
Dave Greggory wrote:
> We had something similar happen again last night. For some reason, one of our
> producers lost the connection to RabbitMQ at 7:47 PM
How did you observe this?
> but the shutDownCompleted event did not fire on that producer till 8:58 PM.
It's possible for a stale network connection to go undetected for a long
time. The presence of firewalls and loadbalancers in the path seems to
increase the likelihood of this happening.
> Any thoughts? Is there something in the java client api that could prevent the
> shutdownEvent from firing quickly?
No. The most likely cause is that the tcp stack simply took that long to
notice the connection was dead.
> AMQP Heartbeats were mentioned in another thread, would that help and
> how do we enable these?
Yes, heartbeats would help. Enable them with
You could also try playing with TCP's Keepalive settings.
More information about the rabbitmq-discuss