Table of Contents

Class SendResult

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

Represents the result of a message send operation. Replaces PublishResult with cleaner naming aligned to the ITransportSender contract.

public sealed class SendResult
Inheritance
SendResult
Inherited Members
Extension Methods

Properties

AcceptedAt

Gets the timestamp when the message was accepted by the broker.

public DateTimeOffset? AcceptedAt { get; init; }

Property Value

DateTimeOffset?

The acceptance timestamp, or null if not available.

Error

Gets the error information if the send failed.

public SendError? Error { get; init; }

Property Value

SendError

The error details, or null if the send succeeded.

IsSuccess

Gets a value indicating whether the send operation was successful.

public bool IsSuccess { get; init; }

Property Value

bool

true if the send succeeded; otherwise, false.

MessageId

Gets the message ID assigned by the broker.

public string? MessageId { get; init; }

Property Value

string

The broker-assigned message identifier.

Partition

Gets the partition or shard where the message was stored.

public string? Partition { get; init; }

Property Value

string

The partition identifier, or null if not applicable.

SequenceNumber

Gets the sequence number assigned by the broker (if supported).

public long? SequenceNumber { get; init; }

Property Value

long?

The sequence number, or null if not applicable.

Methods

Failure(SendError)

Creates a failed send result.

public static SendResult Failure(SendError error)

Parameters

error SendError

The error that occurred.

Returns

SendResult

A failed SendResult.

Success(string)

Creates a successful send result.

public static SendResult Success(string messageId)

Parameters

messageId string

The message ID assigned by the broker.

Returns

SendResult

A successful SendResult.