Table of Contents

Class GetDeadLetterMessages

Namespace
Excalibur.Outbox.Postgres
Assembly
Excalibur.Outbox.Postgres.dll

Represents a data request to query failed messages from the Postgres dead letter table.

[NoTenantTerm(TenantConfinement.EstateWide, "an operator-facing dead-letter query: it reads the dead-letter table estate-wide for diagnosis and redrive, not on behalf of a tenant. Its reach is bounded by the retry-count, age and batch arguments it is given, never by tenant state")]
public sealed class GetDeadLetterMessages : DataRequest<IEnumerable<DeadLetterRecord>>, IDataRequest<IDbConnection, IEnumerable<DeadLetterRecord>>, IDataRequest
Inheritance
GetDeadLetterMessages
Implements
Inherited Members

Remarks

Queries archived messages, including retry-exhausted, poison, and administrative records. Supports pagination and filtering by the persisted logical attempt count and timestamp. The attempt-count threshold is exclusive; -1 includes records with zero delivery attempts.

Constructors

GetDeadLetterMessages(string, int, DateTimeOffset?, int, int, int, CancellationToken)

Initializes a new instance of the GetDeadLetterMessages class.

public GetDeadLetterMessages(string deadLetterTableName, int maxRetries, DateTimeOffset? olderThan, int batchSize, int offset, int sqlTimeOutSeconds, CancellationToken cancellationToken)

Parameters

deadLetterTableName string

The fully qualified dead letter table name.

maxRetries int

Exclusive attempt-count threshold. Use -1 to include zero-attempt poison or administrative records.

olderThan DateTimeOffset?

Only return messages that occurred before this timestamp. Pass null to skip time filter.

batchSize int

Maximum number of messages to retrieve.

offset int

Number of records to skip for pagination.

sqlTimeOutSeconds int

The SQL command timeout in seconds.

cancellationToken CancellationToken

The cancellation token.