<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">I'm writing RabbitMQ C-client code. After I turn on the heartbeat option with the "heartbeat" parameter in amqp_login() function - i.e., passing a value 10 (seconds) instead of 0 when calling amqp_login()</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">amqp_rpc_reply_t amqp_login </div>
<div style="RIGHT: auto"> ( amqp_connection_state_t state,</div>
<div style="RIGHT: auto"> char const *vhost,</div>
<div style="RIGHT: auto"> int channel_max,</div>
<div style="RIGHT: auto"> uint32_t frame_max,</div>
<div style="RIGHT: auto"> int heartbeat,</div>
<div style="RIGHT: auto"> amqp_sasl_method_enum sasl_method,</div>
<div style="RIGHT: auto"> ... ) </div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">My C-client can start to receive heartbeat message (the message has frame_type "AMQP_FRAME_HEARTBEAT"). However, after getting the heartbeat messages for two times, the connection and channels opened by my client have been abruptly closed by the server. From what I read in the past articals, if the client sends any kind of message to server before the timeout, the connection shouldn't be closed. However, this is not the case for me - I've tried to respond with either normal messages (via normal channel), or frames with frame type AMQP_<VAR id=yui-ie-cursor></VAR>FRAME_HEARTBEAT (via channel 0) right after the client received the heartbead message, but the connection is still closed by the server regardless.</div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">Is it because the heartbeat functionality has not been fully implemented yet? Or is there any special kind of message that should be send as response message to the heartbeat message? If it's the second case, can you provide sample code for reponse message? </div>
<div style="RIGHT: auto"> </div>
<div style="RIGHT: auto">Thanks a lot,</div>
<div style="RIGHT: auto">Dawn </div></div></body></html>