[rabbitmq-discuss] How to determine if my message was publish successfully
Michael Klishin
mklishin at gopivotal.com
Wed Oct 30 20:02:09 GMT 2013
On 30 Oct 2013, at 23:56, cw storm <cwstorm at gmail.com> wrote:
> I'm using the java client libraries from RabbitMQ. Just wondering if it's possible to determine if a message was publish to the queue successfully or not after invoking basicPublish. If so, can you please share example code how this is accomplish?
http://www.rabbitmq.com/confirms.html
http://hg.rabbitmq.com/rabbitmq-java-client/file/default/test/src/com/rabbitmq/examples/ConfirmDontLoseMessages.java
(TL;DR: com.rabbitmq.client.Channel#waitForConfirms)
Note that
1. You want confirm batches (of 16, 32, 64 messages) if possible
2. Even with batch confirmation, Publisher Confirms have significant impact on publishing throughput
MK
Software Engineer, Pivotal/RabbitMQ
More information about the rabbitmq-discuss
mailing list