Interface MessageContext
- Namespace
- MassTransit
- Assembly
- MassTransit.Abstractions.dll
The message context includes the headers that are transferred with the message
public interface MessageContext
Properties
ConversationId
The conversationId of the message, which is copied and carried throughout the message flow by the infrastructure.
Guid? ConversationId { get; }
Property Value
- Guid?
CorrelationId
If the message implements the CorrelatedBy(Guid) interface, this field should be populated by default to match that value. It can, of course, be overwritten with something else.
Guid? CorrelationId { get; }
Property Value
- Guid?
DestinationAddress
The destination address of the message
Uri? DestinationAddress { get; }
Property Value
- Uri
ExpirationTime
The expiration time of the message if it is not intended to last forever.
DateTime? ExpirationTime { get; }
Property Value
FaultAddress
The fault address to which fault events should be sent if the message consumer faults
Uri? FaultAddress { get; }
Property Value
- Uri
Headers
Additional application-specific headers that are added to the message by the application or by features within MassTransit, such as when a message is moved to an error queue.
Headers Headers { get; }
Property Value
Host
The host information of the message producer. This may not be present if the message was sent from an earlier version of MassTransit.
HostInfo Host { get; }
Property Value
InitiatorId
If this message was produced within the context of a previous message, the CorrelationId of the message is contained in this property. If the message was produced from a saga instance, the CorrelationId of the saga is used.
Guid? InitiatorId { get; }
Property Value
- Guid?
MessageId
The messageId assigned to the message when it was initially Sent. This is different than the transport MessageId, which is only for the Transport.
Guid? MessageId { get; }
Property Value
- Guid?
RequestId
If the message is a request, or related to a request, such as a response or a fault, this contains the requestId.
Guid? RequestId { get; }
Property Value
- Guid?
ResponseAddress
The response address to which responses to the request should be sent
Uri? ResponseAddress { get; }
Property Value
- Uri
SentTime
When the message was originally sent
DateTime? SentTime { get; }
Property Value
SourceAddress
The address of the message producer that sent the message
Uri? SourceAddress { get; }
Property Value
- Uri