RabbitMQ and DB operations

Does RabbitMQ support a scenario in which a received confirmation message is sent when a database transaction is committed?

We are currently sending ack after a database transaction transaction. If the service does not work between them, we will get data duplication - the service will receive the same message again.

Is there a pattern for this problem?

Thanks!

+4
source share
1 answer

Yes, yes, but remember that RabbitMQ uses its own database to store messages (for now). To get RabbitMQ to send the account to the publisher, use TX mode. This is described in the specification and on different parts of our website.

If you want to use your own database, you can configure it as an end user for messages. In this case, you should use your own application level.

Feel free to email rabbitmq-discuss for more information and questions.

NTN

Alexis

+3
source

Source: https://habr.com/ru/post/1302855/


All Articles