I'd like to know what is the best way to deal with communication errors (rabbitmq crash or network problems for example), with java API.
We use the Channel.basicPublish(...) method and we would like to guaranty delivery for each message we send to the broker.
To be more specific, is there a mecanism in the java client publish API (before the message is sent to the bus) that insures that the message will be delivered (or a callback called when the bus send an IOException), or do we have to implement this process ?
How would you do that ?
The response on rabbitMQ list from Simon MacMullen : " At the moment the only way you can guarantee that a publish has gone through is to publish inside a transaction - when the transaction commit completes the message is on disk (assuming durable queue / persistent message). This is a little heavyweight though. In the future we intend to introduce streaming publisher acks to do the same job in a more async way.
Cheers, Simon "