Table of Contents

Class ConsumerContext

Namespace
CarrotMQ.Core.Handlers
Assembly
CarrotMQ.Core.dll

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

initialUserName string

See InitialUserName.

initialServiceName string

See InitialServiceName.

messageProperties MessageProperties

See MessageProperties.

customHeader IDictionary<string, string>

See CustomHeader.

messageId Guid

See MessageId.

correlationId Guid?

See CorrelationId.

createdAt DateTimeOffset

See 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

DateTimeOffset

MessageId

Gets the unique message id.

public Guid MessageId { get; }

Property Value

Guid

MessageProperties

Gets the message properties. The default is Default

public MessageProperties MessageProperties { get; }

Property Value

MessageProperties