@ramonsmits, I’m simply trying to make sure there is no chance of any transaction being escalated to a distributed transaction.
I believe you can get information not only how @SeanFeldman mentioned, but also by looking at the key/value pairs in Settings:
context.Settings.TryGet("Transactions.SuppressDistributedTransactions", out bool suppressDistributedTransactions);
context.Settings.TryGet("Transactions.DoNotWrapHandlersExecutionInATransactionScope", out bool doNotWrapHandlersExecutionInATransactionScope);
I’m using RabbitMQ for the broker, which automatically sets the TransactionMode to ReceiveOnly. However, if MSDTC is installed on the machine on which you’re running an endpoint, and that endpoint write business data to persistence (in this case, Sql Server), then that handler does any type of message dispatch(es), I believe that automatically escalates the transaction to a distributed transaction (b/c both a database and a queue in the same logical transaction in the handler code).