-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Description
Hello, is there any way to stop CAP jobs (publishing, consumption, execution of received messages) at any given time manually?
Basically what I need is to stop CAP processes when CTRL+C is pressed (but wait for the ongoing executions to complete) and not wait until StopAsync method of Bootstrapper class is executed by host itself (because HostOptions.ShutdownTimeout is increased). Would it be correct to invoke StopAsync myself inside of IHostApplicationLifetime.ApplicationStopping.Register? (Some reflection would be needed to get the Bootstrapper instance, since it is internal). It is a matter of graceful shutdown.