Class ConsumerContext
Contains information from the Context sent by the client and some additional information about the received message in the consumer context.
public sealed class ConsumerContext : Context
- Inheritance
-
ConsumerContext
- Inherited Members
Constructors
ConsumerContext(string?, string?, MessageProperties, IDictionary<string, string>?, Guid, Guid?, DateTimeOffset)
Initializes a new instance of the ConsumerContext class with the specified parameters.
public ConsumerContext(string? initialUserName, string? initialServiceName, MessageProperties messageProperties, IDictionary<string, string>? customHeader, Guid messageId, Guid? correlationId, DateTimeOffset createdAt)
Parameters
initialUserNamestringSee InitialUserName.
initialServiceNamestringSee InitialServiceName.
messagePropertiesMessagePropertiesSee MessageProperties.
customHeaderIDictionary<string, string>See CustomHeader.
messageIdGuidSee MessageId.
correlationIdGuid?See CorrelationId.
createdAtDateTimeOffsetSee CreatedAt.
Properties
CorrelationId
Gets the id which correlates a response to the original request.
public Guid? CorrelationId { get; }
Property Value
- Guid?
CreatedAt
Gets the message creation time.
public DateTimeOffset CreatedAt { get; }
Property Value
MessageId
Gets the unique message id.
public Guid MessageId { get; }
Property Value
MessageProperties
Gets the message properties. The default is Default
public MessageProperties MessageProperties { get; }