Struct DeadLetteredJobCursor
- Namespace
- MailFathom.Application.Jobs.DeadLetters
- Assembly
- MailFathom.Application.dll
Marks where one page of dead letters ended, so the next page continues from it.
public readonly record struct DeadLetteredJobCursor : IEquatable<DeadLetteredJobCursor>
- Implements
- Inherited Members
Remarks
The reading is ordered newest first by the instant the job stopped, with the job's own identifier breaking a tie, and this pairs those two values with a fingerprint of the filters the page was read under. Keyset rather than offset because the set moves while it is being read: a worker dead-lettering another job, or an operator retrying one from a second terminal, would otherwise shift a window and cause a job to be skipped or listed twice — which on this surface means an operator acting on a list that no longer describes the queue.
It carries no secret and needs no signature: every value in it is one the caller already supplied or already received. Encoding is about opacity rather than protection — a client that cannot read a cursor does not build one.
Fields
- MaximumEncodedLength
The greatest number of characters an encoded cursor may carry before it is refused unread.
Properties
- DeadLetteredAt
Gets the instant the last job the page returned reached its state.
- FilterFingerprint
Gets the fingerprint of the filters this cursor was issued for.
- JobId
Gets that job, which breaks a tie between two that stopped in one instant.
Methods
- After(DateTimeOffset, JobId, string)
Creates the cursor that continues a walk after one position in the reading.
- Encode()
Writes the cursor as the opaque string a caller presents to continue the walk.
- TryDecode(string?, out DeadLetteredJobCursor)
Reads a cursor a caller presented.