<div dir="ltr"><div>The library will return a library error of AMQP_STATUS_CONNECTION_CLOSED if the underling connection to the broker has been severed.</div><div><br></div>As of rabbitmq-c v0.4.0 the library will send and receive heartbeats when doing long-running calls into the library (e.g., calling amqp_consume_message()) after they've been enabled by specifying a non-zero heartbeat parameter in amqp_login(). Note that if a heartbeat timeout occurs a library error of AMQP_STATUS_HEARTBEAT_TIMEOUT will be returned.<div>
<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 19, 2013 at 2:23 AM, Tim Watson <span dir="ltr"><<a href="mailto:watson.timothy@gmail.com" target="_blank">watson.timothy@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What you want to do is turn on AMQP heartbeats. IIRC the c client requires that you manage the send/recv of these by hand though.<br>
<div class="HOEnZb"><div class="h5"><br>
On 19 Aug 2013, at 09:32, Haster <<a href="mailto:haster2004@yandex.ru">haster2004@yandex.ru</a>> wrote:<br>
<br>
> Hi there!<br>
> Does rabbitmq-c library have any method to check correctness of connection?<br>
><br>
> For example I call basic.consume and start reading loop from Server... And<br>
> server fall down, or network cord was cut by something... As I understand I<br>
> won't be give noticed about this situations... (my loop is constructed on<br>
> waiting socket in select function)?<br>
><br>
> So is it any way to know about such problems?<br>
><br>
><br>
><br>
> --<br>
> View this message in context: <a href="http://rabbitmq.1065348.n5.nabble.com/rabbitmq-c-and-network-problems-tp28910.html" target="_blank">http://rabbitmq.1065348.n5.nabble.com/rabbitmq-c-and-network-problems-tp28910.html</a><br>
> Sent from the RabbitMQ mailing list archive at Nabble.com.<br>
> _______________________________________________<br>
> rabbitmq-discuss mailing list<br>
> <a href="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>
rabbitmq-discuss mailing list<br>
<a href="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>
</div></div></blockquote></div><br></div>