我有一个程序当前抛出MSMQ 事务尚未启动。如果使用此事务发送而没有任何警告或异常,MSQM 将把消息扔到死信队列中!例外。我不确定我做错了什么,所以无论如何要调试/记录消息队列事务的当前状态?
基本上,我目前得到:
DoSomething(); // may have problem here
using (var scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = IsolationLevel.ReadCommitted, Timeout = TransactionManager.DefaultTimeout }))
{
// throws exception here, but I believe the above method does something wrong
bus.Publish(new SomethingHappened(1, "test"));
scope.Complete();
}