<div dir="ltr">amqp_basic_publish() is not an RPC (its asynchronous), so amqp_get_rpc_reply() will not give you the answer you&#39;re looking for.<div><br></div><div>Because rabbitmq-c doesn&#39;t deal with async events very well there isn&#39;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.</div>
<div><br></div><div>-Alan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 25, 2013 at 5:31 PM, 3k4b251 <span dir="ltr">&lt;<a href="mailto:314992959@qq.com" target="_blank">314992959@qq.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">thank you �all �of you .<br>
� � When �I �send message to �the � exchange �which �not exist. � then �I<br>
use �the code : � amqp_rpc_reply_t �Result = amqp_get_rpc_reply<br>
(m_connSend);<br>
<br>
� �It&#39;s �result � �AMQP_RESPONSE_NORMAL ..... �how �can �I � know �the<br>
channel �exception �happened ?<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://rabbitmq.1065348.n5.nabble.com/rabbitmq-c-can-t-send-message-to-queue-tp31614p31645.html" target="_blank">http://rabbitmq.1065348.n5.nabble.com/rabbitmq-c-can-t-send-message-to-queue-tp31614p31645.html</a><br>

<div class="im HOEnZb">Sent from the RabbitMQ mailing list archive at Nabble.com.<br>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<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>