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

Chapter 4. Hosting

We have already seen how simple NServiceBus makes it to turn a normal class library into a runnable messaging endpoint using the NServiceBus.Host package. The host process gives us many shortcuts that simplify setting up a messaging endpoint, and as we will see in Chapter 9, Administration, it even allows us to easily install an endpoint as a Windows service.

The time has come to lift the veil and learn how NServiceBus is hosted, both within the NServiceBus Host and within other processes. Chief among these are web applications, although it is possible to host NServiceBus within Windows Presentation Foundation (WPF) and Windows Forms apps as well. We must be able to configure and host our messaging infrastructure within all of these environments.

In this chapter, you will learn how to use the NServiceBus configuration methods to host a message bus within any application we want, or to customize an application hosted by the NServiceBus.Host package.