Class FatalExceptionLoggerConsumerBehavior
- Namespace
- Silverback.Messaging.Diagnostics
- Assembly
- Silverback.Integration.dll
Logs the unhandled exceptions thrown while processing the message. These exceptions are fatal since they will usually cause the consumer to stop.
public class FatalExceptionLoggerConsumerBehavior : IConsumerBehavior, IBrokerBehavior, ISorted
- Inheritance
-
FatalExceptionLoggerConsumerBehavior
- Implements
- Inherited Members
Constructors
FatalExceptionLoggerConsumerBehavior(ISilverbackLogger<FatalExceptionLoggerConsumerBehavior>)
Initializes a new instance of the FatalExceptionLoggerConsumerBehavior class.
public FatalExceptionLoggerConsumerBehavior(ISilverbackLogger<FatalExceptionLoggerConsumerBehavior> logger)
Parameters
Properties
SortIndex
Gets the sort index.
public int SortIndex { get; }
Property Value
Methods
HandleAsync(ConsumerPipelineContext, ConsumerBehaviorHandler, CancellationToken)
Process, handles or transforms the message being consumed.
public ValueTask HandleAsync(ConsumerPipelineContext context, ConsumerBehaviorHandler next, CancellationToken cancellationToken)
Parameters
contextConsumerPipelineContextThe context that is passed along the behaviors pipeline.
nextConsumerBehaviorHandlerThe next behavior in the pipeline.
cancellationTokenCancellationTokenThe cancellation token that can be used to cancel the operation.