Class DlqService
The dead-letter store and its operations: capture a failed exchange (from a route checkpoint),
query/page the store, replay an entry back through its route, discard, and prune. Raw ADO.NET on
purpose — the table is flat and provider-specific, like the audit store.
Several Tsak clusters may share the database: an entry carries the cluster that captured it
(Tsak:Cluster:ClusterName), and every operation sees only this node's cluster, so another
cluster's entry is "not found" here. An entry captured before cluster isolation has no cluster: it is
listed and pruned by every cluster, and replayed only while the database holds a single cluster
(; without one — outside cluster mode — it is this node's own).
public sealed class DlqService
Inheritance
Properties
IsAvailable
public bool IsAvailable { get; }
Provider
public AuditProvider Provider { get; }
Methods
CaptureAsync(string, RouteCheckpoint, Exception, CancellationToken)
Persists a failed exchange captured at a route checkpoint. Never throws.
public Task CaptureAsync(string contextName, RouteCheckpoint checkpoint, Exception exception, CancellationToken ct = default)
DiscardAsync(string, CancellationToken)
public Task<bool> DiscardAsync(string entryId, CancellationToken ct = default)
PruneAsync(DateTimeOffset, CancellationToken)
public Task<int> PruneAsync(DateTimeOffset cutoff, CancellationToken ct = default)
QueryAsync(string?, string?, string?, DateTimeOffset?, DateTimeOffset?, int, int, CancellationToken)
public Task<FailedExchangeQueryResult> QueryAsync(string? context = null, string? route = null, string? status = null, DateTimeOffset? since = null, DateTimeOffset? until = null, int limit = 100, int offset = 0, CancellationToken ct = default)
ReplayAsync(string, CancellationToken)
public Task<ExchangeReplayResult> ReplayAsync(string entryId, CancellationToken ct = default)