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
originalMessageIdGuidmessageTypestringpayloadReadOnlyMemory<byte>reasonDeadLetterReasonoriginalCreatedAtDateTimeOffseterrorMessagestringexceptionExceptionattemptCountintsourceQueuestringmetadataIReadOnlyDictionary<string, string>
Properties
AttemptCount
Gets the number of times processing was attempted.
public int AttemptCount { get; }
Property Value
DeadLetteredAt
Gets when the message was moved to the dead letter queue.
public DateTimeOffset DeadLetteredAt { get; }
Property Value
EntryId
Gets the unique identifier for this dead letter entry.
public Guid EntryId { get; }
Property Value
ErrorMessage
Gets the detailed error message if available.
public string? ErrorMessage { get; }
Property Value
Exception
Gets the exception that caused the failure, if any.
public Exception? Exception { get; }
Property Value
MessageType
Gets the original message type.
public string MessageType { get; }
Property Value
Metadata
Gets optional custom metadata.
public IReadOnlyDictionary<string, string>? Metadata { get; }
Property Value
OriginalCreatedAt
Gets when the message was originally created.
public DateTimeOffset OriginalCreatedAt { get; }
Property Value
OriginalMessageId
Gets the original message ID.
public Guid OriginalMessageId { get; }
Property Value
Payload
Gets the serialized message payload.
public ReadOnlyMemory<byte> Payload { get; }
Property Value
Reason
Gets the reason this message was dead-lettered.
public DeadLetterReason Reason { get; }
Property Value
SourceQueue
Gets the source queue name if available.
public string? SourceQueue { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()