Reputation: 583
We are planning to use RabbitMq for our messaging service, we'll publish all the message requests to a RabbitMq durable queue.
For .Net client we've decided to use EasyNetQ, so the question is how should we handle RabbitMq server being while publishing a message?
Upvotes: 2
Views: 7172
Reputation: 22682
In general if you want to be sure about the publish you can use the publish confirmation.
as you can read, you can do that using the transactions or with ConfirmListener.
To handle the broker fails, you can store locally the failed messages then try to re-send them after x seconds.
Note: I don't know how EasyNetQ works, but the native publish is asynchronous, so trap the publish exceptions is not enough. That's why you should use publish confirm to deal with it.
Upvotes: 3