Interface IConsumeObserver
- Namespace
- MassTransit
- Assembly
- MassTransit.Abstractions.dll
Intercepts the ConsumeContext
public interface IConsumeObserver
Methods
ConsumeFault<T>(ConsumeContext<T>, Exception)
Called after the message has been dispatched to all consumers when one or more exceptions have occurred
Task ConsumeFault<T>(ConsumeContext<T> context, Exception exception) where T : class
Parameters
context
ConsumeContext<T>exception
Exception
Returns
Type Parameters
T
PostConsume<T>(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<T>(ConsumeContext<T> context) where T : class
Parameters
context
ConsumeContext<T>
Returns
Type Parameters
T
PreConsume<T>(ConsumeContext<T>)
Called before a message is dispatched to any consumers
Task PreConsume<T>(ConsumeContext<T> context) where T : class
Parameters
context
ConsumeContext<T>The consume context
Returns
Type Parameters
T