<div dir="ltr">library_error = 0 means an EOF was received from the socket, so the socket has been closed.<div><br></div><div>-Alan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 7, 2013 at 6:01 AM, Jain, Punit <span dir="ltr">&lt;<a href="mailto:Punit.Jain@emc.com" target="_blank">Punit.Jain@emc.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Thank you, Alan.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">Yes, I mean �broker failure� in the same sense as you have explained. I am using AMQP_RESPONSE_LIBRARY_EXCEPTION as an indication of broker failure. What does �library_error = 0� signify with that exception?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u>�<u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d">- Punit<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u>�<u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1f497d"><u></u>�<u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt"><div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="mailto:rabbitmq-discuss-bounces@lists.rabbitmq.com" target="_blank">rabbitmq-discuss-bounces@lists.rabbitmq.com</a> [mailto:<a href="mailto:rabbitmq-discuss-bounces@lists.rabbitmq.com" target="_blank">rabbitmq-discuss-bounces@lists.rabbitmq.com</a>] <b>On Behalf Of </b>Alan Antonuk<br>
<b>Sent:</b> Monday, October 07, 2013 11:47 AM<br><b>To:</b> Jain, Punit<br><b>Cc:</b> <a href="mailto:rabbitmq-discuss@lists.rabbitmq.com" target="_blank">rabbitmq-discuss@lists.rabbitmq.com</a><br><b>Subject:</b> Re: [rabbitmq-discuss] rabbitmq-c: how to detect broker failure<u></u><u></u></span></p>
</div></div><div><div class="h5"><p class="MsoNormal"><u></u>�<u></u></p><div><p class="MsoNormal">It depends on what you mean by &quot;broker failure&quot;.�<u></u><u></u></p><div><p class="MsoNormal"><u></u>�<u></u></p>
</div><div><p class="MsoNormal">If you mean the broker hardware dies, the broker crashes, or (more likely) something interrupts the network: you&#39;ll get an network error on the client side. �In rabbitmq-c this manifests itself in different ways depending on the function being called: for functions returning an int, a non-zero value is returned, for functions returning an amqp_rpc_reply_t, type will be set to AMQP_RESPONSE_LIBRARY_EXCEPTION and library_error will be set to something non-zero, and for things returning a amqp_*_t object if a NULL value is returned, calling amqp_get_last_rpc_reply() will get an amqp_rpc_reply_t which the above rule should be followed.<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u>�<u></u></p></div><div><p class="MsoNormal">HTH<u></u><u></u></p></div><div><p class="MsoNormal">-Alan<u></u><u></u></p></div></div><div><p class="MsoNormal" style="margin-bottom:12.0pt">
<u></u>�<u></u></p><div><p class="MsoNormal">On Fri, Oct 4, 2013 at 6:13 AM, Jain, Punit &lt;<a href="mailto:Punit.Jain@emc.com" target="_blank">Punit.Jain@emc.com</a>&gt; wrote:<u></u><u></u></p><div><div><p class="MsoNormal">
Hi,<u></u><u></u></p><p class="MsoNormal">I am using rabbitmq-c amqp client (0.2.0) to publish messages to RabbitMQ broker. I want to be notified in case of broker failure. Is there a way to detect this?<u></u><u></u></p>
<p class="MsoNormal">Any method or exception, which may notify us about this error while establishing a connection or publishing message?<u></u><u></u></p><p class="MsoNormal">�<u></u><u></u></p><p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">Punit<u></u><u></u></p></div></div></div><p class="MsoNormal"><u></u>�<u></u></p></div></div></div></div></div></div></blockquote></div><br></div>