[rabbitmq-discuss] rabbitmq-c can't send message to queue

Alan Antonuk alan.antonuk at gmail.com
Tue Nov 26 05:57:41 GMT 2013

amqp_basic_publish() is not an RPC (its asynchronous), so
amqp_get_rpc_reply() will not give you the answer you're looking for.

Because rabbitmq-c doesn't deal with async events very well there isn't a
good API to check for channel exceptions that occur as a result of an async
operation. Your best bet would be to call amqp_simple_wait_frame_noblock()
with a short timeout, if a channel exception occurs you will get a
AMQP_CHANNEL_CLOSE_METHOD frame from the broker.


On Mon, Nov 25, 2013 at 5:31 PM, 3k4b251 <314992959 at qq.com> wrote:

> thank you  all  of you .
>     When  I  send message to  the   exchange  which  not exist.   then  I
> use  the code :   amqp_rpc_reply_t  Result = amqp_get_rpc_reply
> (m_connSend);
>    It's  result    AMQP_RESPONSE_NORMAL .....  how  can  I   know  the
> channel  exception  happened ?
> --
> View this message in context:
> http://rabbitmq.1065348.n5.nabble.com/rabbitmq-c-can-t-send-message-to-queue-tp31614p31645.html
> Sent from the RabbitMQ mailing list archive at Nabble.com.
> _______________________________________________
> 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/20131125/da2c6dca/attachment.htm>

More information about the rabbitmq-discuss mailing list