When Endpoint Instance Starts and Stops

Component: NServiceBus
NuGet Package NServiceBus (6.x)

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


Last modified