<div dir="ltr">Rohit;<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 1, 2014 at 11:31 PM, Rohit Patle <span dir="ltr"><<a href="mailto:Rohit.Patel2@techmahindra.com" target="_blank">Rohit.Patel2@techmahindra.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">




<div>
<div style="direction:ltr;font-size:10pt;font-family:Tahoma">Hi,<br>
<br>
I am using rabbitmq-c with following specifications:<br>
Name: Librabbitmq<br>
Description: An AMQP 0-9-1 client library<br>
Client library Version: 0.3.0<br>
Rabbitmq server Version: 3.2.2-1<br></div></div></blockquote><div><br></div><div>I would highly recommend upgrading to v0.4.1 if possible, as there have been several improvements around error handling since v0.3.0.�</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div style="direction:ltr;font-size:10pt;font-family:Tahoma">

<br>
1. I am trying to close the channel and getting the<span style="background-color:rgb(255,255,0)"> AMQP_RESPONSE_LIBRARY_EXCEPTION</span> in amqp_channel_close API. Can you tell me what are the different reason for :<br>
<br>
i. AMQP_RESPONSE_LIBRARY_EXCEPTION,<br>
ii.� AMQP_RESPONSE_SERVER_EXCEPTION<br>
iii. AMQP_RESPONSE_NONE<br></div></div></blockquote><div>�</div><div>See: <a href="https://github.com/alanxz/rabbitmq-c/blob/5f291ea772a536da3087f216e240016365e61a82/librabbitmq/amqp.h#L1582">https://github.com/alanxz/rabbitmq-c/blob/5f291ea772a536da3087f216e240016365e61a82/librabbitmq/amqp.h#L1582</a></div>
<div><br></div><div>Hopefully you never see an AMQP_RESPONSE_NONE - as that would likely indicate a bug somewhere.�</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><div style="direction:ltr;font-size:10pt;font-family:Tahoma">
<br>
2. What will be the implication if I call amqp_destroy_connection without calling amqp_connection_close, amqp_queue_unbind and amqp_queue_delete? Will it release all the internal resources acquired while creating the connection? In other words, is there any
 need to call these APIs if I am going to call amqp_destroy_connection API alone?<br></div></div></blockquote><div><br></div><div>Calling amqp_destroy_connection without calling amqp_connection_close first will cause the underlying socket to be closed without sending the connection.close method to the broker. This should not leak any resources on the client side. �On the broker side the broker will eventually detect that the socket has been closed and will emit a warning to the error log indicating that a connection closed unexpectedly.</div>
<div><br></div><div>As for amqp_queue_unbind and amqp_queue_delete, these only manipulate objects defined on the broker. A queue may or may not hang around after a client disconnects depending on how it was declared. A queue binding will hang around as long as both the exchange and queue still exist.</div>
<div><br></div><div>HTH</div><div>-Alan</div></div></div></div>