[rabbitmq-discuss] Publisher Confirms support in Rabbitmq-c client.
alan.antonuk at gmail.com
Wed Jul 18 05:04:00 BST 2012
rabbitmq-c does support publisher confirms, its not as easy to use as on
the other clients.
On the channel you want to turn on confirms (error handling elided):
amqp_channel_t channel = 1;
Then to handle the publish confirms:
// 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
// Check that frame is on channel 1
if (frame.method == AMQP_BASIC_ACK)
// Message successfully delivered
// Read properties
// Check that frame is on channel 1, and that its a properties type
uint64_t body_size = frame.properties.body_size;
uint64_t body_read = 0;
// Read body frame
while (body_read < body_size)
// Check frame is on channel 1, and that is a body frame
body_read += frame.body_fragment.len;
// Read basic.ack
// Check frame is on channel 1, and that its a basic.ack
This is used in SimpleAmqpClient, see BasicPublish function for details:
On Tue, Jul 17, 2012 at 6:28 PM, Jerry Kuch <jerryk at rbcon.com> wrote:
> Publisher confirms are a quite recent Rabbit extension to AMQP and the C
> clients tend to lag behind a bit, unfortunately.
> I'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'd think.
> Sent from my iPad.
> On Jul 17, 2012, at 1:55 PM, rohit <mailrohitp at gmail.com> wrote:
> > Hi,
> > After looking in rabbitmq-c client source code, I feel there is no
> > implementation of Publisher confirms in the client. Can someone confirm
> > this?
> > Also does anyone know if it is ever going to be implemented as part of
> > client, or a third party patch to achieve this.
> > Thanks in advance.
> > --Rohit
> > --
> > View this message in context:
> > 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
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss