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
idstringmessageMessage<TPayload>reasonstringfailedAtDateTimeOffsetattemptsintsourcestringexceptionTypestringexceptionMessagestring
Properties
Attempts
Number of attempts before dead-lettering.
public int Attempts { get; }
Property Value
ExceptionMessage
Captured exception message when exception details are enabled.
public string? ExceptionMessage { get; }
Property Value
ExceptionType
Captured exception type when exception details are enabled.
public string? ExceptionType { get; }
Property Value
FailedAt
When the message failed.
public DateTimeOffset FailedAt { get; }
Property Value
Id
Dead-letter record identifier.
public string Id { get; }
Property Value
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
Source
Pipeline, endpoint, or transport source that captured the failure.
public string? Source { get; }