Class SendResult
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
IsSuccess
Gets a value indicating whether the send operation was successful.
public bool IsSuccess { get; init; }
Property Value
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
SequenceNumber
Gets the sequence number assigned by the broker (if supported).
public long? SequenceNumber { get; init; }
Property Value
Methods
Failure(SendError)
Creates a failed send result.
public static SendResult Failure(SendError error)
Parameters
errorSendErrorThe error that occurred.
Returns
- SendResult
A failed SendResult.
Success(string)
Creates a successful send result.
public static SendResult Success(string messageId)
Parameters
messageIdstringThe message ID assigned by the broker.
Returns
- SendResult
A successful SendResult.