[rabbitmq-discuss] atomic transactions

Emile Joubert emile at rabbitmq.com
Fri Mar 23 10:52:42 GMT 2012


Hi,

On 22/03/12 03:39, gaillard wrote:
> I have need to use transactions in the following way:
> -get a message (m1) from queue A
> -transforms the message and create new message (m2)
> -publish m2 to queue B
> -ack m1
> -commit the transaction (includes ack and publish)
> 
> Which i believe in all failure scenarios should result in possibly two
> things:
> m1 on queue A, nothing on queue B
> m2 on queue B, nothing on queue A
> 
> Is this what will happen in rabbit 2.7 or 2.8?

Mostly yes, but bear in mind that transactions are not atomic in
RabbitMQ. So if the broker crashes or an error occurs during commit then
your invariant might not hold. If you are dealing with very high value
messages then you should add additional logging and correlate the input
and output.

This page has more information about transaction semantics:
http://www.rabbitmq.com/semantics.html


-Emile




More information about the rabbitmq-discuss mailing list