Interface IDeadLetteredJobStore
- Namespace
- MailFathom.Application.Jobs.DeadLetters
- Assembly
- MailFathom.Application.dll
Reads the jobs that stopped, and carries out the two decisions an operator can take about one.
public interface IDeadLetteredJobStore
Remarks
Separate from IJobStore because the callers are separate. That contract is the worker's, and every method on it is conditional on the lease the calling attempt holds; nothing here holds a lease, because a dead letter is claimed by nobody. Folding the two together would put an operator's decision behind a lease owner it would have to invent, and would widen the surface a worker sees to include writes no worker may make.
Both decisions are conditional on the job still being dead-lettered, which is what makes them safe to repeat and safe to race: two terminals acting on the same job produce one change and one answer of JobNotDeadLettered, rather than a retry that resurrects work a drop had just finished with.
Methods
- DropAsync(JobId, CancellationToken)
Records that one dead letter will never be run, leaving the row and its failure where they are.
- ReadPageAsync(DeadLetteredJobQuery, CancellationToken)
Serves one bounded page of the jobs nothing will attempt again.
- RetryAsync(JobId, CancellationToken)
Returns one dead letter to the queue, to be run again under the identity it already carries.