When Endpoint Instance Starts and Stops

Component: NServiceBus
NuGet Package NServiceBus (7-pre)
This page targets a pre-release version and is subject to change prior to the final release.

Classes that plug into the startup/shutdown sequence are invoked just after the endpoint instance has been started and just before it is stopped. Use this approach for any tasks that need to execute with the same life-cycle as the endpoint instance.

The IWantToRunWhenBusStartsAndStops interface is no longer available.

When self-hosting, there are several options for equivalent behavior:

Achieving the IWantToRunWhenBusStartsAndStops when using the Hosts

Samples


Last modified