Table of Contents

Class EmailOccurrenceJobPayload

Namespace
MailFathom.Application.Jobs
Assembly
MailFathom.Application.dll

Points one job at a single stored message occurrence, and at nothing inside the message.

public sealed record EmailOccurrenceJobPayload : IJobPayload, IEquatable<EmailOccurrenceJobPayload>
Inheritance
EmailOccurrenceJobPayload
Implements
Inherited Members

Remarks

The four components are the stable remote occurrence identity — account, folder binding, UIDVALIDITY, and UID — so a handler resolves what it needs from committed local state rather than from anything the enqueuer copied. A subject, an address, a body, and extracted text are all absent by construction: there is no property to put one in.

The folder is named by its alias and the generation that alias was bound under rather than by the local key of the row, because the identity is only stable while its folder component identifies one specific remote folder, and an alias can be repointed to another one.

The properties are primitives rather than the domain value objects they came from, because this record is the stored document: it is serialized into one jsonb column and read by an operator looking at a queue. Rebuilding the identity is ToOccurrenceId(), which validates every component the way the domain types do.

Properties

AccountId

Gets the account whose mailbox the occurrence belongs to.

FolderAlias

Gets the operator-facing name of the folder the occurrence was read in.

FolderResolutionGeneration

Gets which binding of that alias the occurrence belongs to.

JobType

Gets the job type this payload is the one contract of.

Uid

Gets the UID the occurrence carries within that UIDVALIDITY scope.

UidValidity

Gets the UIDVALIDITY the folder advertised when the occurrence was stored.

Methods

For(EmailOccurrenceId)

Describes one occurrence as the document a job carries.

ToOccurrenceId()

Rebuilds the occurrence identity this payload names.