Enum BackgroundExecutionExceptionBehavior
Specifies what happens when a message executed in the background fails.
public enum BackgroundExecutionExceptionBehavior
- Extension Methods
Fields
LogOnly = 0The failure is logged as an error and the host keeps running. This is the default.
StopHost = 1The failure is logged, and the host is then asked to stop through
IHostApplicationLifetime.StopApplication(). The host must provideIHostApplicationLifetime; startup fails if it does not.
Remarks
This is a host-level policy, in the same shape as HostOptions.BackgroundServiceExceptionBehavior:
it is configured once for the application, never per message.