Interface IClaimScopedDeadLetterableOutboxStore
A payload-free capability for atomic acquisition-scoped dead-letter completion.
public interface IClaimScopedDeadLetterableOutboxStore
- Extension Methods
Remarks
Resolve through the store's IServiceProvider capability seam. This is separate from ordinary claim completion because a store may support delivery without advertising a dead-letter transition.
This facet operates on the same owning IOutboxStore rows already subject to its row-partition capability gate; it is not an independently registered tenant store. The globally persisted ID and exact acquisition address the row. Retain or copy that row's tenant provenance during the terminal transition, without adding a caller-supplied or ambient tenant predicate to the cross-tenant drain. Tenant-facing downstream work establishes its owner scope from the recorded row.
Methods
MarkDeadLetteredAsync(string, string, int, string, CancellationToken)
Dead-letters a message only while the caller holds its current acquisition.
ValueTask<OutboxCompletionOutcome> MarkDeadLetteredAsync(string messageId, string reason, int attemptCount, string claimIdentity, CancellationToken cancellationToken)
Parameters
messageIdstringThe persisted identifier captured at acquisition.
reasonstringThe reason for the terminal disposition.
attemptCountintNonnegative logical attempt count; applied transitions retain its maximum.
claimIdentitystringThe nonblank identity captured from the acquisition, never a process ID.
cancellationTokenCancellationTokenToken to monitor for cancellation requests.
Returns
- ValueTask<OutboxCompletionOutcome>
The outcome decided atomically with the guarded transition.
Remarks
Validate arguments before mutation. Missing/released/different leases return ClaimLost, retained terminal rows AlreadyTerminal and absent rows MessageNotFound. Refusals are returned, not thrown. No completion may classify its outcome by rereading after a separate mutation.