[rabbitmq-discuss] In RabbitMQ-C Getting AMQP_CHANNEL_CLOSE_METHOD without closing channel

Alan Antonuk alan.antonuk at gmail.com
Mon Jun 3 18:39:18 BST 2013


In addition to Emile's suggestion when you get a AMQP_CHANNEL_CLOSE_METHOD,
cast the frame.properties.decoded to an amqp_channel_close_t*. You can then
examine the reply_text to get the error message from the broker. You may
need to use the class_id and method_id members might be useful in
determining what the error message is referring to.

Also a note about amqp_basic_publish, its return value will only indicate
the failure to pass the message to the broker (say the underlying socket
gets closed). If you publish to a non-existent exchange (which will cause a
channel exception) for example, the amqp_basic_publish won't indicate
failure. The failure will reported 'some time in the future' as an channel
exception in the form of a AMQP_CHANNEL_CLOSE_METHOD.

HTH
-Alan



On Mon, Jun 3, 2013 at 2:54 AM, Emile Joubert <emile at rabbitmq.com> wrote:

>
> Hi,
>
> On 03/06/13 07:43, pawanksingh wrote:
> > I am Getting AMQP_CHANNEL_CLOSE_METHOD without closing any channel.
>
>
> This is likely due to a channel exception. In that case the broker
> logfile will also have an explanation of the problem.
>
>
>
> -Emile
>
>
>
>
>
>
>
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130603/6a351103/attachment.htm>


More information about the rabbitmq-discuss mailing list