[rabbitmq-discuss] Transaction Dependencies
vvernon at shiftmethod.com
Wed Apr 13 15:59:19 BST 2011
Thanks much, Tim. That helps me make a decision. I always assign a
message id so I can use message de-duplication at the subscriber side. I
may use message command idempotence in some cases.
On 4/13/2011 8:02 AM, Tim Fox wrote:
> RabbitMQ clients don't expose any sort of XA/JTA interface so
> enlisting a Rabbit local tx in a larger global XA tx won't be possible.
> You can probably find other ways to ensure atomicity by some kind of
> resend approach and detecting duplicates.
> On -10/01/37 20:59, Vaughn Vernon wrote:
>> How do you recommend handling the case where a local application
>> database transaction may commit or rollback, and you don't want to
>> publish the event unless it commits? In other words:
>> 1 - application transaction begins
>> 2 - application writes to database
>> 3 - rmq message published (publish must succeed for application
>> transaction to succeed)
>> 4 - application transaction commits; however, issue occurs,
>> transaction does not complete; must prevent rmq publish
>> Can't move #3 after #4 because the possibility exists that rmq
>> publish will fail and message will never be published.
>> This points to 2pc of application and rmq, but unavailable for the
>> application database. BTW, does rmq 2pc with other databases?
>> rabbitmq-discuss mailing list
>> rabbitmq-discuss at lists.rabbitmq.com
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss