Class JobIdempotencyKey
- Namespace
- MailFathom.Application.Jobs
- Assembly
- MailFathom.Application.dll
Identifies one execution, in the words of whoever knows what the work is.
public sealed record JobIdempotencyKey : IEquatable<JobIdempotencyKey>
- Inheritance
-
JobIdempotencyKey
- Implements
- Inherited Members
Remarks
The key is opaque to the store and unique together with the job type across the whole table, terminal rows included. It is derivable from the trigger alone, so an enqueuer composes it without reading the table first and a retried enqueue is answered rather than refused.
It is composed of MailFathom's own names and identifiers — an account alias, a folder alias, an occurrence, a rule identity and version — and never of a subject, an address, or anything else out of the message. An operator reads this text when they ask what a stuck job is, so a digest would be shorter and would tell them nothing; mail content in it would make the queue a second uncontrolled copy of personal data.
A row keeps its key in every terminal state, which is what stops the same trigger enqueuing the same work again. So pruning terminal rows is what ends the deduplication, and whichever change adds pruning inherits a retention floor of the longest window in which one trigger can legitimately fire again.
Fields
- MaximumLength
The greatest length a key may have, which bounds the column it is stored in and the index over it.
Properties
- Value
Gets the text two enqueues of the same work are compared by.
Methods
- Create(string)
Creates a key from the text the enqueuer composed.
- ToString()
Returns a string that represents the current object.