Closed mindisk closed 10 months ago
It turned out that I had introduced a bug recently in how nested RebusTransactionScope
s work.
It should be fixed in Rebus 7.2.1.
Rebus 8 does not have that problem, because its TransactionContext
has a different way of managing itself.
Thanks for directing my attention to this issue 🙂 👍
Hello,
I am experiencing some weird and interesting behavior when using Rebus >=7.1.1 regarding transactions.
You are welcome to correct me of how we use Rebus.
I have have wrapped
IBus
instance and implemented the following methods for publishing messages and replying to requests. InPublishMessageAsync
I use transaction scope. I did that to fix some issues I occasionally used to face where I would require to interact withAmbientTransactionScope
to unassigned current transaction and then assign it back.Now, I have a
Handle
that essentially, receive a request, publishes an command and sends a reply. Prior >=v7.1.1 it worked as expected. No errors and all messages have been sent.However, with >=7.1.1, I started getting errors. Once I publish the command and attempt to reply, I am getting this error. It seems, that inner transaction that is bounded to the request is gone after we punish the command. If we do not publish the command, it works OK.
Is this expected behavior?