Table of Contents

Class OutboundMessageTransport

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

Represents the delivery status of a message to a specific transport.

public sealed class OutboundMessageTransport
Inheritance
OutboundMessageTransport
Inherited Members
Extension Methods

Remarks

This class tracks the delivery state of a single outbound message to a single transport. When a message needs to be published to multiple transports, each transport has its own OutboundMessageTransport record to track success/failure independently.

Constructors

OutboundMessageTransport()

Initializes a new instance of the OutboundMessageTransport class.

public OutboundMessageTransport()

OutboundMessageTransport(string, string)

Initializes a new instance of the OutboundMessageTransport class.

public OutboundMessageTransport(string messageId, string transportName)

Parameters

messageId string

The ID of the parent outbound message.

transportName string

The name of the target transport.

Properties

AttemptedAt

Gets or sets the timestamp when delivery was attempted.

public DateTimeOffset? AttemptedAt { get; set; }

Property Value

DateTimeOffset?

CreatedAt

Gets or sets the timestamp when this record was created.

public DateTimeOffset CreatedAt { get; set; }

Property Value

DateTimeOffset

Destination

Gets or sets the transport-specific destination (queue, topic, exchange).

public string? Destination { get; set; }

Property Value

string

Id

Gets or sets the unique identifier for this transport record.

public string Id { get; set; }

Property Value

string

LastError

Gets or sets the last error message if delivery failed.

public string? LastError { get; set; }

Property Value

string

MessageId

Gets or sets the ID of the parent outbound message.

public string MessageId { get; set; }

Property Value

string

RetryCount

Gets or sets the number of delivery attempts.

public int RetryCount { get; set; }

Property Value

int

SentAt

Gets or sets the timestamp when delivery was successful.

public DateTimeOffset? SentAt { get; set; }

Property Value

DateTimeOffset?

Status

Gets or sets the current delivery status for this transport.

public TransportDeliveryStatus Status { get; set; }

Property Value

TransportDeliveryStatus

TransportMetadata

Gets or sets transport-specific metadata as JSON.

public string? TransportMetadata { get; set; }

Property Value

string

TransportName

Gets or sets the name of the target transport.

public string TransportName { get; set; }

Property Value

string

Methods

IsEligibleForRetry(int, int)

Determines if this transport delivery is eligible for retry.

public bool IsEligibleForRetry(int maxRetries = 3, int retryDelayMinutes = 5)

Parameters

maxRetries int

Maximum retry attempts.

retryDelayMinutes int

Minimum delay between retries.

Returns

bool

True if eligible for retry.

MarkFailed(string)

Marks this transport delivery as failed.

public void MarkFailed(string error)

Parameters

error string

The error description.

MarkSending()

Marks this transport delivery as in progress.

public void MarkSending()

MarkSent()

Marks this transport delivery as successful.

public void MarkSent()

MarkSkipped(string?)

Marks this transport delivery as skipped (e.g., due to routing rules).

public void MarkSkipped(string? reason = null)

Parameters

reason string

The reason for skipping.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.