Method RetryAsync
- Namespace
- MailFathom.Application.Jobs.DeadLetters
- Assembly
- MailFathom.Application.dll
RetryAsync(JobId, CancellationToken)
Returns one dead letter to the queue, to be run again under the identity it already carries.
Task<JobRecoveryOutcome> RetryAsync(JobId jobId, CancellationToken cancellationToken)
Parameters
jobIdJobIdThe job to attempt again.
cancellationTokenCancellationTokenCancels the write.
Returns
- Task<JobRecoveryOutcome>
What happened to the job.
Remarks
The row is the same row, so the work runs under its original idempotency identity: this repeats the execution rather than enqueuing a second one, and the promise every handler is registered on — that running it twice with one payload is the same as running it once — is what makes that safe.
The attempt count is given back with the job, because a bound that has already been reached would dead-letter the work again on its first attempt and make the decision a no-op. The failure that ended it is kept, so the row still says why it stopped until something newer replaces it.