【发布时间】:2021-08-25 18:22:45
【问题描述】:
命名空间:Azure.Messaging.ServiceBus
我在我的 ServiceBusSender.SendMessageAsync 操作周围使用事务范围,并得到“其他资源管理器/DTC 不支持本地事务。”
事务范围可以与 Azure 服务总线一起使用吗?
当前范围:
using (var transaction = new TransactionScope(
TransactionScopeOption.Required,
new TransactionOptions
{
IsolationLevel = IsolationLevel.Serializable
},
TransactionScopeAsyncFlowOption.Enabled))
{
try
{
// do a database operation
// do azure bus sendmessageasync
}
catch
{
transaction.Dispose();
throw;
}
}
【问题讨论】:
标签: azure azureservicebus transactionscope msdtc