Interface ReceiveContext
- Namespace
- MassTransit
- Assembly
- MassTransit.Abstractions.dll
The receive context is sent from the transport when a message is ready to be processed from the transport.
public interface ReceiveContext : PipeContext
- Inherited Members
- Extension Methods
Properties
Body
The message body
MessageBody Body { get; }
Property Value
ContentType
The content type of the message, as determined by the available headers
ContentType ContentType { get; }
Property Value
ElapsedTime
TimeSpan ElapsedTime { get; }
Property Value
InputAddress
The address on which the message was received
Uri InputAddress { get; }
Property Value
- Uri
IsDelivered
Returns true if the message was successfully consumed by at least one consumer
bool IsDelivered { get; }
Property Value
IsFaulted
Returns true if a fault occurred during the message delivery
bool IsFaulted { get; }
Property Value
PublishEndpointProvider
The publish endpoint provider from the transport
IPublishEndpointProvider PublishEndpointProvider { get; }
Property Value
PublishFaults
If true (the default), faults should be published when no ResponseAddress or FaultAddress are present.
bool PublishFaults { get; }
Property Value
ReceiveCompleted
The task that is completed once all pending tasks are completed
Task ReceiveCompleted { get; }
Property Value
Redelivered
If True, the message is being redelivered by the transport
bool Redelivered { get; }
Property Value
SendEndpointProvider
The send endpoint provider from the transport
ISendEndpointProvider SendEndpointProvider { get; }
Property Value
TransportHeaders
Headers specific to the transport
Headers TransportHeaders { get; }
Property Value
Methods
AddReceiveTask(Task)
Adds a pending Task to the completion of the message receiver
void AddReceiveTask(Task task)
Parameters
task
Task
NotifyConsumed<T>(ConsumeContext<T>, TimeSpan, string)
Notify that a message has been consumed from the received context
Task NotifyConsumed<T>(ConsumeContext<T> context, TimeSpan duration, string consumerType) where T : class
Parameters
context
ConsumeContext<T>The consume context of the message
duration
TimeSpanThe time spent by the consumer
consumerType
stringThe consumer type
Returns
Type Parameters
T
NotifyFaulted(Exception)
Notify that a message receive faulted outside of the message consumer
Task NotifyFaulted(Exception exception)
Parameters
exception
ExceptionThe exception that occurred
Returns
NotifyFaulted<T>(ConsumeContext<T>, TimeSpan, string, Exception)
Notify that a message consumer faulted
Task NotifyFaulted<T>(ConsumeContext<T> context, TimeSpan duration, string consumerType, Exception exception) where T : class
Parameters
context
ConsumeContext<T>The consume context of the message
duration
TimeSpanThe time spent by the consumer
consumerType
stringThe message consumer type that faulted
exception
ExceptionThe exception that occurred
Returns
Type Parameters
T