I am executing a series of SQL Inserts from a MassTransit Handler. I create a Transaction Scope, so all Inserts pass or fail. Works with zero issues when RabbitMQ is the Bus.
On switching to Azure Service Bus, introducing a Transaction Scope for SQL Server is a problem for Azure Service Bus, who hooks into it and will not let go.
Errors thrown
- Require IsolationLevel.Serializable
- Local transactions are not supported with other resource managers/DTC
In any case the code in not working anymore with the Trnx Scope set as it was.
I had to Suppress the Transaction Scope to get the code to work, but that is not the solution.
I want to know how to prevent Azure Service Bus from engaging in a Transaction Scope explicitly meant for SQL Server - do not assume things.
Is there a way to signal Service Bus from MassTransit not to engage in the SQL Transaction scope?
I am sure others have run into this - look forward to the solutions.