[rabbitmq-discuss] How do heartbeats work? (was Heartbeat timeout)

Matthias Radestock matthias at rabbitmq.com
Thu Jul 7 23:50:23 BST 2011


On 07/07/11 23:37, Matthew Sackman wrote:
> On Fri, Jul 08, 2011 at 12:34:18AM +0200, Simone Busoli wrote:
>> This is something I was unaware of, although I knew heartbeats were in
>> place. Does that mean that whatever client library I'm using, if for any
>> reason the client does not respond to two consecutive server heartbeats then
>> the server will close the connection and the client has to create a new one
>> to set-up the communication once again?
>
> Yes. Note though that the client specifies the interval between the
> heartbeats in the connection parameters.

Also note that peers aren't "responding" to heartbeats. Heartbeats only 
need to be sent by a peer when it is not sending anything else. The 
other side just monitors the timing of the arrival of data, and when 
there is a significant gap it drops the connection.

Matthias.


More information about the rabbitmq-discuss mailing list