Table of Contents

Class DeadLetterEntry

Namespace
DotCompute.Abstractions.Messaging
Assembly
DotCompute.Abstractions.dll

Represents an entry in the dead letter queue.

public sealed class DeadLetterEntry : IDisposable
Inheritance
DeadLetterEntry
Implements
Inherited Members
Extension Methods

Remarks

Contains the original message along with metadata about why it was moved to the dead letter queue.

Constructors

DeadLetterEntry(Guid, string, ReadOnlyMemory<byte>, DeadLetterReason, DateTimeOffset, string?, Exception?, int, string?, IReadOnlyDictionary<string, string>?)

Creates a new dead letter entry.

public DeadLetterEntry(Guid originalMessageId, string messageType, ReadOnlyMemory<byte> payload, DeadLetterReason reason, DateTimeOffset originalCreatedAt, string? errorMessage = null, Exception? exception = null, int attemptCount = 1, string? sourceQueue = null, IReadOnlyDictionary<string, string>? metadata = null)

Parameters

originalMessageId Guid
messageType string
payload ReadOnlyMemory<byte>
reason DeadLetterReason
originalCreatedAt DateTimeOffset
errorMessage string
exception Exception
attemptCount int
sourceQueue string
metadata IReadOnlyDictionary<string, string>

Properties

AttemptCount

Gets the number of times processing was attempted.

public int AttemptCount { get; }

Property Value

int

DeadLetteredAt

Gets when the message was moved to the dead letter queue.

public DateTimeOffset DeadLetteredAt { get; }

Property Value

DateTimeOffset

EntryId

Gets the unique identifier for this dead letter entry.

public Guid EntryId { get; }

Property Value

Guid

ErrorMessage

Gets the detailed error message if available.

public string? ErrorMessage { get; }

Property Value

string

Exception

Gets the exception that caused the failure, if any.

public Exception? Exception { get; }

Property Value

Exception

MessageType

Gets the original message type.

public string MessageType { get; }

Property Value

string

Metadata

Gets optional custom metadata.

public IReadOnlyDictionary<string, string>? Metadata { get; }

Property Value

IReadOnlyDictionary<string, string>

OriginalCreatedAt

Gets when the message was originally created.

public DateTimeOffset OriginalCreatedAt { get; }

Property Value

DateTimeOffset

OriginalMessageId

Gets the original message ID.

public Guid OriginalMessageId { get; }

Property Value

Guid

Payload

Gets the serialized message payload.

public ReadOnlyMemory<byte> Payload { get; }

Property Value

ReadOnlyMemory<byte>

Reason

Gets the reason this message was dead-lettered.

public DeadLetterReason Reason { get; }

Property Value

DeadLetterReason

SourceQueue

Gets the source queue name if available.

public string? SourceQueue { get; }

Property Value

string

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()