0
votes

I am evaluating AMQP 1.0 together with Azure Service Bus and currently looking into transaction support - 2 phase commit coordinating a database insert/update/delete with read/write of messages to the bus). Using "Amqp.Net Lite" for .Net in my tests.

  • Does Azure Service Bus support 2PC transactions?
  • Does AMQP 1.0 and Amqp.Net Lite support 2PC transactions? (any code examples?)
1

1 Answers

3
votes

Does Azure Service Bus support 2PC transactions?

No.

Does AMQP 1.0 and Amqp.Net Lite support 2PC transactions? (any code examples?)

No.

You can find the samples under AMQP.NET Lite repo

Why there are no 2PC transactions? You're in the cloud environment and resources not only are service-based but also distant. 2PC over multiple resources with a distributed transaction controller to coordinate it all will time out. For Azure Service Bus and AMQP.NET Lite there is support for transactions, transport level transactions. I.e. you can receive/send messages in a transactional manner, but no other service can participate in that transaction. You would need to change your implementation architecture to deal with idempotency.

There was a good Twitter series on 2PC and cloud you might find helpful.