views:

311

answers:

1

Hi,

Does RabbitMQ support a scenario where a received message acknowledgement is sent on the DB transaction commit?

Currently we send ack after DB transaction commit. If service fails inbetween, we'll get data duplication - service will get the same message again.

Is there a pattern for this problem?

Thanks!

+1  A: 

Yes it does, but do be aware that RabbitMQ uses its own DB for message storage (at the moment). To get RabbitMQ to send an ack to the publisher, use TX mode. This is documented in the spec and on various parts of our web site.

If you want to use your own DB then you may want to set it up as an end consumer for messages. In this case, you should use your own application-level ack.

Do feel free to email the rabbitmq-discuss for more info and questions.

HTH

alexis

alexis