In my Rebus handler I am performing a database operation and then send commands to other three handlers

183 Views Asked by At

I want to execute database operation in a handler and then send three commands to other handlers. I want to make sure that all the execution of database operation together with sending commands occur in a transaction and whether all succeed or all fail. I am using .net core and when I try to do this I get an exception that "This platform does not support distributed Transactions" I was using RabbitMQ Transport and then SQL server transport but still getting the same problem. I would like to know the best way to ensure that all the execution is ATOMIC under .NET Core and RabbitMQ or SQL Server transport. Thanks

1

There are 1 best solutions below

1
On

I am surprised that you get this particular exception, because Rebus does not participate in distributed transactions (at least not with any of the supported transports, and especially not with RabbitMQ).

Could you maybe update your question to include the full exception details (with stack trace and everything)? And maybe tell a little bit about how you're performing your database operations?