Book Image

Learning NServiceBus - Second Edition

By : David Boike
Book Image

Learning NServiceBus - Second Edition

By: David Boike

Overview of this book

Table of Contents (18 chapters)
Learning NServiceBus Second Edition
About the Author
About the Reviewers


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.

DTC 101

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...