[rabbitmq-discuss] Enable Heartbeat
tim at rabbitmq.com
Fri Dec 21 10:31:03 GMT 2012
On 21 Dec 2012, at 10:19, PSL 88506 wrote:
> If we enable heartbeat, can we ensure that there would not be any dangling connections.
> If connection is idle for some time (say no consumer exists), Will enabling heartbeat takes care of closing the connections after some period of time?
If the connection is idle, but still connected, then heartbeats will not close the connection. Heartbeats will ensure that if a connection 'goes away' it will be noticed within some time frame, much like TCP keep-alive though with the added benefit that both ends knows about the other away and the broker can therefore tear down resources as soon as possible.
If you want your consumer to drop connections when it's not doing anything then make it disconnect when it's finished consuming!?
More information about the rabbitmq-discuss