One of the new features in NServiceBus 5.0 is important to understand, especially if you plan to run NServiceBus in the cloud. The Outbox feature is designed as a replacement for the Distributed Transaction Coordinator (DTC), and it is turned on by default for the RabbitMQ transport (which does not support DTC) but is turned off by default for other transports that support the DTC.
In order to understand Outbox, we should first understand, at least at a high level, what the DTC does for us.
Many resources, such as SQL Server or MSMQ for example, support local transactions that are unique to that resource. The SqlTransaction
class is an example of a local transaction on a SQL Server resource.
DTC is a service built into Windows that is capable of controlling multiple local transactions simultaneously. A resource that supports the DTC can automatically upgrade its local transaction to a distributed transaction that is managed by the DTC. When we do a transactional receive against...