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
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Transactions


Each message transport has recommended transaction settings that it will select by default, but NServiceBus gives you the ability to override these if you choose to do so. For example, the following command can be used to disable distributed transactions:

cfg.Transactions().DisableDistributedTransactions();

Several other methods, which are easily discoverable via IntelliSense, will also allow you to enable distributed transactions (as they are not turned on by default for every transport), enable and disable transactions in general, set the transaction isolation level and timeout settings, and control whether or not message handlers get wrapped with a TransactionScope.