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

Message transport


The most important configuration setting for NServiceBus is the selection of the message transport. Microsoft Message Queuing (MSMQ) is the default transport and is used throughout this book, but several other transports are currently supported.

Declaring any of the transports when self-hosting follows the same pattern. For example, here is how you would explicitly select MSMQ, although as the default transport, doing so isn't required:

cfg.UseTransport<MsmqTransport>();

The MsmqTransport type parameter is a class that inherits from NServiceBus.TransportDefinition. In addition to being the default transport, MSMQ is also built into the NServiceBus core.

Using any of the other transports also requires an additional NuGet package. The full details about the use of each alternative transport are beyond the scope for this book, but we will cover them briefly.

Note

It's technically possible, though not exactly easy, to implement your own message transport and configure NServiceBus...