Table of Contents

Constructor DeadLetteredJob

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

DeadLetteredJob(JobId, JobType, JobIdempotencyKey, MailAccountId?, int, DateTimeOffset, DateTimeOffset)

One job nothing will attempt again, as the operator deciding what to do about it reads it.

public DeadLetteredJob(JobId JobId, JobType JobType, JobIdempotencyKey Key, MailAccountId? AccountId, int AttemptCount, DateTimeOffset EnqueuedAt, DateTimeOffset DeadLetteredAt)

Parameters

JobId JobId

The job's own identifier, which is what a retry or a drop names it by.

JobType JobType

The kind of work.

Key JobIdempotencyKey

The identity the enqueuer composed, which the row keeps and a retry runs under unchanged.

AccountId MailAccountId?

The account the work belongs to, and null when it belongs to none.

AttemptCount int

How many attempts were handed out before the job stopped.

EnqueuedAt DateTimeOffset

When the work was first enqueued.

DeadLetteredAt DateTimeOffset

When the job reached the state it is in now.

Remarks

Everything here is either MailFathom's own name for something or a count: the type's name, the identity the enqueuer composed out of aliases and identifiers, the account alias, how many attempts were spent, and the operator-safe record of what ended it. The payload is deliberately absent — it names a message occurrence, and an operator deciding whether to run the work again does not need to be told which message while deciding it.

The two instants answer different questions. EnqueuedAt says how long the work has been outstanding, which is what makes a backlog of dead letters legible as one; DeadLetteredAt says when it stopped, which is what a failure is correlated against the deployment change that caused it by.