rabbitmq-c does support publisher confirms, its not as easy to use as on the other clients.<div><br></div><div>On the channel you want to turn on confirms (error handling elided):</div><div>amqp_channel_t channel = 1;</div>
<div>amqp_channel_open(conn, channel);</div><div>amqp_confirm_select(conn, channel);</div><div><br></div><div>Then to handle the publish confirms:</div><div>amqp_basic_publish(...);</div><div>// You then need to wait for either a basic.ack or then a basic.return followed by a message, followed by basic.ack in the case of a delivery failure:</div>
<div><br></div><div>amqp_frame_t frame;</div><div>amqp_simple_wait_frame(conn, &amp;frame);</div><div>// Check that frame is on channel 1</div><div>if (frame.method == AMQP_BASIC_ACK)</div><div>{</div><div>� // Message successfully delivered<br>
}</div><div>else</div><div>{</div><div>�// Read properties</div><div>�amqp_simple_wait_frame(conn, &amp;frame);</div><div>�// Check that frame is on channel 1, and that its a properties type</div><div>�uint64_t body_size = frame.properties.body_size;</div>
<div>��</div><div>�uint64_t body_read = 0;</div><div>�// Read body frame</div><div>�while (body_read &lt; body_size)</div><div>�{</div><div>� �amqp_simple_wait_frame(conn, &amp;frame);</div><div>� �// Check frame is on channel 1, and that is a body frame</div>
<div>� �body_read += frame.body_fragment.len;</div><div>�} ��</div><div>�</div><div>�// Read basic.ack</div><div>�amqp_simple_wait_frame(conn, &amp;frame);</div><div>�// Check frame is on channel 1, and that its a basic.ack<br>
}</div><div><br></div><div><br></div><div>This is used in SimpleAmqpClient, see BasicPublish function for details:</div><div><a href="https://github.com/alanxz/SimpleAmqpClient/blob/master/src/Channel.cpp#L287">https://github.com/alanxz/SimpleAmqpClient/blob/master/src/Channel.cpp#L287</a></div>
<div><br></div><div>-Alan<br><br><div class="gmail_quote">On Tue, Jul 17, 2012 at 6:28 PM, Jerry Kuch <span dir="ltr">&lt;<a href="mailto:jerryk@rbcon.com" target="_blank">jerryk@rbcon.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Publisher confirms are a quite recent Rabbit extension to AMQP and the C clients tend to lag behind a bit, unfortunately.<br>
<br>
I&#39;m not aware of current plans to support them or any existing patches. �Anybody else? �What happens at the wire level is pretty straightforward so really the work will all be in handling them asynchronously I&#39;d think.<br>

<br>
<br>
Sent from my iPad.<br>
<div class="HOEnZb"><div class="h5"><br>
On Jul 17, 2012, at 1:55 PM, rohit &lt;<a href="mailto:mailrohitp@gmail.com">mailrohitp@gmail.com</a>&gt; wrote:<br>
<br>
&gt;<br>
&gt; Hi,<br>
&gt;<br>
&gt; After looking in rabbitmq-c client source code, I feel there is no<br>
&gt; implementation of Publisher confirms in the client. Can someone confirm<br>
&gt; this?<br>
&gt; Also does anyone know if it is ever going to be implemented as part of the<br>
&gt; client, or a third party patch to achieve this.<br>
&gt;<br>
&gt; Thanks in advance.<br>
&gt;<br>
&gt; --Rohit<br>
&gt;<br>
&gt; --<br>
&gt; View this message in context: <a href="http://rabbitmq.1065348.n5.nabble.com/Publisher-Confirms-support-in-Rabbitmq-c-client-tp20862.html" target="_blank">http://rabbitmq.1065348.n5.nabble.com/Publisher-Confirms-support-in-Rabbitmq-c-client-tp20862.html</a><br>

&gt; Sent from the RabbitMQ mailing list archive at Nabble.com.<br>
&gt; _______________________________________________<br>
&gt; rabbitmq-discuss mailing list<br>
&gt; <a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
&gt; <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>
_______________________________________________<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>