[rabbitmq-discuss] Any pre-tx_commit validation possible on a channel?

Paul McGuire ptmcg at austin.rr.com
Tue Sep 7 18:27:40 BST 2010

I realize that a 100% airtight solution is not possible, but is there
any way before calling tx_commit to anticipate at least some simple
failures in sending messages that have been buffered up in a
transaction?  I am trying to merge AMQP messaging with XA two-phase

In XA, I can send the messages (by calling tx_commit) at voting time,
which would rollback any db changes if the message send fails (at XA
voting time, any failure causes all other participants to rollback).
But if I send messages at voting time, consumers of the message see a
pre-commit view of the database, which is not really what I want.

If I send the message/call tx_commit at XA finish time, then consumers
will see the post-commit database view, but a failed message send will
not rollback the database.  (I do still get the benefit of database
failures causing the message transaction to abort with this approach.)

Is there any channel or message-publishing validation I can do at XA
voting time that might anticipate a message publishing failure?

-- Paul

More information about the rabbitmq-discuss mailing list