Interface IStopConsumerErrorPolicyCallback
- Namespace
- Silverback.Messaging.Consuming.ErrorHandling
- Assembly
- Silverback.Integration.dll
Declares the OnStoppingConsumerAsync(IRawInboundEnvelope, Exception) callback.
public interface IStopConsumerErrorPolicyCallback : IErrorPolicyCallback
Methods
OnStoppingConsumerAsync(IRawInboundEnvelope, Exception)
Called when the consumer is about to be stopped because of a processing error, either because the StopConsumerErrorPolicy is applied or because no other policy could handle the error (e.g. after the maximum number of retries has been reached).
Task OnStoppingConsumerAsync(IRawInboundEnvelope envelope, Exception exception)
Parameters
envelopeIRawInboundEnvelopeThe envelope containing the message that couldn't be processed. It's an IInboundEnvelope only if the message was successfully deserialized, since the error could have occurred before or during the deserialization.
exceptionExceptionThe exception that caused the consumer to be stopped.