Table of Contents

Interface IConsumeMessageObserver<T>

Namespace
MassTransit
Assembly
MassTransit.Abstractions.dll

Intercepts the ConsumeContext

public interface IConsumeMessageObserver<in T> where T : class

Type Parameters

T

The message type

Methods

ConsumeFault(ConsumeContext<T>, Exception)

Called after the message has been dispatched to all consumers when one or more exceptions have occurred

Task ConsumeFault(ConsumeContext<in T> context, Exception exception)

Parameters

context ConsumeContext<T>
exception Exception

Returns

Task

PostConsume(ConsumeContext<T>)

Called after the message has been dispatched to all consumers - note that in the case of an exception this method is not called, and the DispatchFaulted method is called instead

Task PostConsume(ConsumeContext<in T> context)

Parameters

context ConsumeContext<T>

Returns

Task

PreConsume(ConsumeContext<T>)

Called before a message is dispatched to any consumers

Task PreConsume(ConsumeContext<in T> context)

Parameters

context ConsumeContext<T>

The consume context

Returns

Task