Table of Contents

Class TransportReceivedMessage

Namespace
Excalibur.Dispatch.Transport
Assembly
Excalibur.Dispatch.Transport.Abstractions.dll

Represents a message received from a transport. This is the slim replacement for MessageEnvelope in the transport layer, following the Microsoft.Extensions.AI minimal-type pattern.

public sealed class TransportReceivedMessage
Inheritance
TransportReceivedMessage
Inherited Members
Extension Methods

Remarks

Provider-specific data (lock tokens, receipt handles, consumer offsets, delivery tags) flows via ProviderData so the core interface stays transport-agnostic.

Properties

Body

Gets or sets the message body content.

public ReadOnlyMemory<byte> Body { get; set; }

Property Value

ReadOnlyMemory<byte>

The message body as a byte buffer.

ContentType

Gets or sets the content type of the message body.

public string? ContentType { get; set; }

Property Value

string

The MIME content type of the body.

CorrelationId

Gets or sets the correlation identifier for message tracking across services.

public string? CorrelationId { get; set; }

Property Value

string

The correlation identifier.

DeliveryCount

Gets or sets the number of delivery attempts for this message.

public int DeliveryCount { get; set; }

Property Value

int

The delivery attempt count.

EnqueuedAt

Gets or sets the time when the message was enqueued at the broker.

public DateTimeOffset EnqueuedAt { get; set; }

Property Value

DateTimeOffset

The enqueue timestamp.

Id

Gets or sets the unique identifier of the message.

public string Id { get; set; }

Property Value

string

The message identifier.

LockExpiresAt

Gets or sets the time when the message lock expires (for peek-lock scenarios).

public DateTimeOffset? LockExpiresAt { get; set; }

Property Value

DateTimeOffset?

The lock expiration timestamp, or null if not locked.

MessageGroupId

Gets or sets the message group ID (session ID in Azure, ordering key in Google).

public string? MessageGroupId { get; set; }

Property Value

string

The message group identifier.

MessageType

Gets or sets the message type identifier for routing and processing.

public string? MessageType { get; set; }

Property Value

string

The message type identifier.

PartitionKey

Gets or sets the partition key for the message.

public string? PartitionKey { get; set; }

Property Value

string

The partition key.

Properties

Gets the message properties/attributes received from the broker.

public IReadOnlyDictionary<string, object> Properties { get; init; }

Property Value

IReadOnlyDictionary<string, object>

The read-only message properties dictionary.

ProviderData

Gets provider-specific data: lock tokens, receipt handles, consumer offsets, delivery tags.

public Dictionary<string, object> ProviderData { get; init; }

Property Value

Dictionary<string, object>

The provider-specific data dictionary.

Remarks

Transport implementations store their native acknowledgment tokens here. For example, AWS SQS stores ReceiptHandle, Azure Service Bus stores LockToken, Kafka stores Offset and Partition.

Source

Gets or sets the source queue or subscription where this message was received.

public string? Source { get; set; }

Property Value

string

The source name.

Subject

Gets or sets the subject/label of the message.

public string? Subject { get; set; }

Property Value

string

The message subject.