[rabbitmq-discuss] Is heartbeat option working in C-client?
dawn_l2012 at yahoo.com
Sun Dec 2 08:44:34 GMT 2012
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()
( amqp_connection_state_t state,
char const *vhost,
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_FRAME_HEARTBEAT (via channel 0) right after the client received the heartbead message, but the connection is still closed by the server regardless.
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?
Thanks a lot,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss