Table of Contents

Class DeadLetterMessage<TPayload>

Namespace
PatternKit.Messaging.Reliability
Assembly
PatternKit.Core.dll

Captured failed message with operational failure metadata.

public sealed class DeadLetterMessage<TPayload>

Type Parameters

TPayload
Inheritance
DeadLetterMessage<TPayload>
Inherited Members

Constructors

DeadLetterMessage(string, Message<TPayload>, string, DateTimeOffset, int, string?, string?, string?)

Creates a dead-letter message.

public DeadLetterMessage(string id, Message<TPayload> message, string reason, DateTimeOffset failedAt, int attempts, string? source = null, string? exceptionType = null, string? exceptionMessage = null)

Parameters

id string
message Message<TPayload>
reason string
failedAt DateTimeOffset
attempts int
source string
exceptionType string
exceptionMessage string

Properties

Attempts

Number of attempts before dead-lettering.

public int Attempts { get; }

Property Value

int

ExceptionMessage

Captured exception message when exception details are enabled.

public string? ExceptionMessage { get; }

Property Value

string

ExceptionType

Captured exception type when exception details are enabled.

public string? ExceptionType { get; }

Property Value

string

FailedAt

When the message failed.

public DateTimeOffset FailedAt { get; }

Property Value

DateTimeOffset

Id

Dead-letter record identifier.

public string Id { get; }

Property Value

string

Message

The original message with dead-letter metadata headers attached.

public Message<TPayload> Message { get; }

Property Value

Message<TPayload>

Reason

Operational failure reason.

public string Reason { get; }

Property Value

string

Source

Pipeline, endpoint, or transport source that captured the failure.

public string? Source { get; }

Property Value

string