3

I'm building a system in which I'd like to use RabbitMQ as the main message passing mechanism.

My system requires very strong guarantees for message delivery, as in, messages must arrive at their destination and acknowledged, otherwise I expect them to be requeued, and redelievered.

The use case is maintaining eventual consistency between 2 systems

I'd also like to avoid having to manage any state regarding the messages in my application.

I know that publishing a persistent message does not provide a 100% guarantee that it was persisted to disk, because fsync(2) is not called for every message.

thus, my question is - Can I use RabbitMQ as a 100% reliable* message passing mechanism?

I've read about transactions, but couldn't find anything besides a 2011 blogpost which also doesn't explicitly state that an fsync(2) is performed for every message, or that a (synchronous) failure occurs if it doesn't succeed.

* by reliable I mean that the messages should eventually be delivered, always. duplicate messages are acceptable.

4

1 回答 1

1

Can I use RabbitMQ as a 100% reliable message passing mechanism?

Yes, use persistent messages, publisher confirms, and consumer acknowledgements - link.

When your publisher receives a confirmation, the message has been written and synced to disk.


NOTE: the RabbitMQ team monitors the rabbitmq-users mailing list and only sometimes answers questions on StackOverflow.

于 2018-09-04T13:52:09.603 回答