[rabbitmq-discuss] Publisher confirms requires seperate call to get ack?

Simon MacMullen simon at rabbitmq.com
Wed Dec 18 10:00:45 GMT 2013

On 18/12/2013 05:53, Michael Klishin wrote:
> It depends on your client library. E.g. in Java, C# and Ruby (Bunny) you
> can publish as many messages
> as you want and then use Channel#waitForConfirms to wait for all
> outstanding confirms to arrive.

You can do so in the Erlang client - either call 
amqp_channel:wait_for_confirms/1 every so often or (better) call 
amqp_channel:register_conform_handler/2 and accept the confirms 
yourself. That's better because every time you call 
amqp_channel:wait_for_confirms/1 the channel comes to a halt until all 
confirms have arrived.

> it doesn't have to be done per message and RabbitMQ pushes confirms to
> you, you do not poll for acknowledgements.

This is the key point. It sounds like the OP is publishing one message, 
waiting for one confirm, publishing the next message, and so on. That's 
an antipattern (at least when you want to go fast) since you can never 
go faster than 1 / (network round trip time) messages per second.

Cheers, Simon

More information about the rabbitmq-discuss mailing list