<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="RIGHT: auto"><SPAN style="RIGHT: auto">server log says:</SPAN></div>
<div style="RIGHT: auto"><SPAN style="RIGHT: auto"></SPAN>&nbsp;</div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">"=ERROR REPORT==== 2-Dec-2012::10:04:05 ===</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">closing AMQP connection &lt;0.13204.0&gt;&nbsp; (client ip:54786 -&gt; server ip:5672):</SPAN></div>
<div style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px; RIGHT: auto"><SPAN style="RIGHT: auto">{timeout,running}<VAR id=yui-ie-cursor></VAR></SPAN></div>
<div style="RIGHT: auto"><BR style="RIGHT: auto"></div>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV style="RIGHT: auto" dir=ltr><FONT size=2 face=Arial>
<DIV style="BORDER-BOTTOM: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; PADDING-BOTTOM: 0px; LINE-HEIGHT: 0; MARGIN: 5px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; HEIGHT: 0px; FONT-SIZE: 0px; BORDER-TOP: #ccc 1px solid; BORDER-RIGHT: #ccc 1px solid; PADDING-TOP: 0px" class=hr contentEditable=false readonly="true"></DIV><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Dawn L &lt;dawn_l2012@yahoo.com&gt;<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> Matthias Radestock &lt;matthias@rabbitmq.com&gt;; Discussions about RabbitMQ &lt;rabbitmq-discuss@lists.rabbitmq.com&gt; <BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Sunday, December 2, 2012 9:49 AM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [rabbitmq-discuss] Is heartbeat option working in C-client?<BR></FONT></DIV><BR>
<META content=off http-equiv=x-dns-prefetch-control>
<DIV id=yiv689848760>
<DIV>
<DIV style="BACKGROUND-COLOR: #fff; FONT-FAMILY: times new roman, new york, times, serif; COLOR: #000; FONT-SIZE: 12pt">
<DIV><SPAN>Matthias,</SPAN></DIV>
<DIV style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px"><SPAN>&nbsp;&nbsp;&nbsp; Thanks<VAR id=yiv689848760yui-ie-cursor></VAR>&nbsp;for your quick response. My client has sent messages to the server right after the connection is opened, as well as when heartbeat is received... I'm pretty sure that the server has received the message since my client has got a response from it.&nbsp;Everything looks to be right and according the requirement, that's why I suspect that the heartbeat machanism might not be fully working on the server side, since even though it receives data from the client it still tears down the connection. I wonder if you or anybody have been using heartbeat in C-client and has it ever worked?</SPAN></DIV>
<DIV style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px"><SPAN></SPAN>&nbsp;</DIV>
<DIV style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px"><SPAN>&nbsp;&nbsp; The program I'm writing has been working for a few months and I'm trying to add heartbeat handling to deal with the&nbsp;unreliable network.&nbsp;&nbsp;</SPAN></DIV>
<DIV style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px"><SPAN></SPAN>&nbsp;</DIV>
<DIV style="BACKGROUND-COLOR: transparent; FONT-STYLE: normal; FONT-FAMILY: times new roman, new york, times, serif; COLOR: rgb(0,0,0); FONT-SIZE: 16px"><SPAN>Best regards.</SPAN></DIV>
<DIV><SPAN>Dawn</SPAN></DIV>
<DIV><BR></DIV>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt">
<DIV dir=ltr><FONT size=2 face=Arial>
<DIV style="BORDER-BOTTOM: #ccc 1px solid; BORDER-LEFT: #ccc 1px solid; PADDING-BOTTOM: 0px; LINE-HEIGHT: 0; MARGIN: 5px 0px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; HEIGHT: 0px; FONT-SIZE: 0px; BORDER-TOP: #ccc 1px solid; BORDER-RIGHT: #ccc 1px solid; PADDING-TOP: 0px" class=yiv689848760hr></DIV><B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Matthias Radestock &lt;matthias@rabbitmq.com&gt;<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> Dawn L &lt;dawn_l2012@yahoo.com&gt;; Discussions about RabbitMQ &lt;rabbitmq-discuss@lists.rabbitmq.com&gt; <BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Sunday, December 2, 2012 4:39 AM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> Re: [rabbitmq-discuss] Is heartbeat option working in C-client?<BR></FONT></DIV><BR>Dawn,<BR><BR>On 02/12/12 08:44, Dawn L wrote:<BR>&gt; My C-client can start to receive heartbeat message (the message has<BR>&gt; frame_type "AMQP_FRAME_HEARTBEAT"). However,
 after getting the<BR>&gt; heartbeat messages for two times, the connection and channels opened<BR>&gt; by my client have been abruptly closed by the server.<BR><BR>Looks like the server did not receive any frame for too long. Check the<BR>server logs to confirm thwat.<BR><BR>&gt; From what I read in the past articals, if the client sends any kind<BR>&gt; of message to server before the timeout, the connection shouldn't be<BR>&gt; closed. However, this is not the case for me - I've tried to respond<BR>&gt; with either normal messages (via normal channel), or frames with<BR>&gt; frame type AMQP_FRAME_HEARTBEAT (via channel 0) right after the<BR>&gt; client received the heartbead message, but the connection is still<BR>&gt; closed by the server regardless. Is it because the heartbeat<BR>&gt; functionality has not been fully implemented yet? Or is there any<BR>&gt; special kind of message that should be send as response message to<BR>&gt; the heartbeat
 message?<BR><BR>Heartbeats in the sending and receiving direction are completely independent. When a heartbeat interval has been agreed then each peer is supposed to send *some* data to the other at least every heartbeat_interval. The heartbeat frames are there to fill in the time slots when no other data is being sent.<BR><BR>So you certainly shouldn't be *waiting* to receive a heartbeat before sending something since that would establish an artificial interlocking of the sending and receiving direction.<BR><BR>For more details see section 4.2.7 of the AMQP 0-9-1 spec.<BR><BR>If you think you are doing everything right and the connection is still being torn down then look at a protocol trace with wireshark. That should hopefully identify the problem.<BR><BR>Regards,<BR><BR>Matthias.<BR><BR><BR></DIV></DIV></DIV></DIV></DIV>
<META content=on http-equiv=x-dns-prefetch-control><BR>_______________________________________________<BR>rabbitmq-discuss mailing list<BR><A href="mailto:rabbitmq-discuss@lists.rabbitmq.com" ymailto="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</A><BR><A href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target=_blank>https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</A><BR><BR><BR></DIV></DIV></div></body></html>