Table of Contents

Interface IStopConsumerErrorPolicyCallback

Namespace
Silverback.Messaging.Consuming.ErrorHandling
Assembly
Silverback.Integration.dll
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

envelope IRawInboundEnvelope

The 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.

exception Exception

The exception that caused the consumer to be stopped.

Returns

Task

A Task representing the asynchronous operation.