<div dir="ltr"><div>I saw that heartbeats are turned on with 3.0.0 - the question is does 2.8.7 have heartbeat support by default on the server side or can it be turned on? �How is this different the SO_KEEPALIVE:</div><div>
<a href="http://www.erlang.org/doc/man/inet.html">http://www.erlang.org/doc/man/inet.html</a></div><div><br></div><div>�There&#39;s no details on the documentation about configuring the heartbeat on 2.8.7 setting if there is a configuration option for it. �I did find this:<br>


</div><div><a href="https://bugs.launchpad.net/nova/+bug/856764">https://bugs.launchpad.net/nova/+bug/856764</a><br></div><div style>AND</div><div style><a href="http://rabbitmq.1065348.n5.nabble.com/Timeout-for-hung-connection-on-rabbitmq-server-td21354.html">http://rabbitmq.1065348.n5.nabble.com/Timeout-for-hung-connection-on-rabbitmq-server-td21354.html</a><br>
</div><div style>I&#39;m not sure what the difference is between a rabbit heartbeat and erlangs keepalive? �Or is heartbeat just turning on keepalive? �I&#39;m going to look at the erlang configuration as a possible fix. �We&#39;re trying to do this on the server side so we don&#39;t have to modify all of our clients.</div>
<div style><br></div><div style>Here&#39;s a few more details on the exact issue we&#39;ve encountered<br>RAB_SERVER &lt;-&gt; F5/Firewall/etc. &lt;-&gt; RAB_CLIENT</div><div style>the client and server don&#39;t have any traffic going through so they get disconnected in one of two ways. �If we used just a router and not a load balancer it seems most network firewalls auto disconnect with NO notification both clients after an hour of no TCP/IP traffic (from what I understand, SSH for example uses a TCP/IP Keepalive to keep their connections going). �The load balancer on the other hand does a graceful RESET to both client and server after our delay of 300 seconds. �We&#39;ve tried increasing the delay, but it looks like 2.8.7 by default doesn&#39;t set any kind of heartbeat or keepalive so even if we set it to an hour, we&#39;d still get resets.</div>
<div><br></div>Rabbit clients using spring &amp; the shovel configuration itself handle resets of the connection pretty gracefully. �The issue is I&#39;d rather not have resets as I don&#39;t trust all clients to be nice about reconnecting. �The spring code reconnects gracefully - the standard rabbit client doesn&#39;t seem to be as nice about reconnecting.<div>
<br></div><div>Jason<br><div>
<br></div><div><br><div>
<br></div><div><br></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Dec 18, 2012 at 6:52 AM, Emile Joubert <span dir="ltr">&lt;<a href="mailto:emile@rabbitmq.com" target="_blank">emile@rabbitmq.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Hi Jason,<br>
<div class="im"><br>
On 17/12/12 22:53, Jason McIntosh wrote:<br>
<br>
&gt; From what I&#39;ve been told, most network devices drop TCP/IP<br>
&gt; connections after an hour automatically (i.e. switches, routers,<br>
&gt; etc.) and force a reconnect - not sure if Rabbit handles this?<br>
<br>
</div>The broker handles a closed connection by logging the event.<br>
<div class="im"><br>
&gt; There is a work around at the moment we&#39;re looking into. �It looks like<br>
&gt; most (if not all) Rabbit interfaces have a heartbeat setting that would<br>
&gt; allow connections to be maintained<br>
<br>
</div>Yes, AMQP heartbeats are a suitable solution if intermediate network<br>
devices are closing idle connections too eagerly. Heartbeats are enabled<br>
by default in v3.0.0 if the client supports them.<br>
<br>
Another options is to write client applications to re-establish closed<br>
connections after a suitable delay.<br>
<br>
If consumers receive messages asynchronously instead of polling the<br>
broker for messages, and there are no messages to deliver then the TCP<br>
connection will carry no traffic.<br>
<div class="im"><br>
&gt; Other questions related to the above: �Is the AMQP protocol designed to<br>
&gt; have the clients just sit idle, no communication with the servers until<br>
&gt; a message comes in<br>
<br>
</div>Rabbit does not impose limits on connection duration and idle<br>
connections are permitted to remain so indefinitely.<br>
<div class="im"><br>
&gt; If there is no check, and the client hasn&#39;t received a message in a<br>
&gt; day at what point do you retry your connection to verify you&#39;re even<br>
&gt; still connected? It sounds like in this case you could have a<br>
&gt; consumer of a queue lose it&#39;s connection and never realize<br>
<br>
</div>If connections are being severed silently without notification from the<br>
network stack then you must use AMQP heartbeats so that both sides of<br>
the connection become aware of it. Otherwise the network stack should<br>
provide notification that the connection has been interrupted.<br>
<div class="im"><br>
&gt; Then you&#39;d have a server just sitting backlogging messages waiting<br>
&gt; for a client (or worse depending on configuration, just dropping all<br>
&gt; the messages).<br>
<br>
</div>The broker will not drop messages due to broken connections and the<br>
protocol is designed so that a guarantee of message delivery can be<br>
offered even in the face of an unreliable transport.<br>
<div class="im"><br>
&gt; Looked at the AMQP 0-9-1 specifications and not seeing a whole lot<br>
&gt; defined on how AMQP implementers are supposed to work with TCP/IP<br>
&gt; traffic (other than some heartbeat definitions).<br>
<br>
</div>The &quot;connection&quot; class relates to the transport, which must be<br>
stream-oriented.<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
-Emile<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Jason McIntosh<br><a href="http://mcintosh.poetshome.com/blog/">http://mcintosh.poetshome.com/blog/</a><br>573-424-7612
</div></div>