DeadLetterEntry
Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.
DeadLetterEntry =
object
Defined in: src/deadletters/DeadLetterEntry.ts:68
One captured dead letter, as DeadLetterQueue.list returns it.
It deliberately does not carry DeadLetter.attribution — the MDC
snapshot and the span context #773 added to the event — and the reason is
the difference this file opens with. The event is an observation that
exists for as long as a subscriber’s handler runs; an entry is retained for
retentionMs and, under store: 'persistent', written to a journal that
outlives the process. An MDC routinely carries tenant, user and request
identifiers, so persisting it turns a transient diagnostic into a durable,
correlatable store of them — the same decision that makes
DEFAULT_DEAD_LETTER_STORE off and keeps the payload out of
DeadLetterRef’s log line, taken again one layer down.
The replay argument points the same way. An entry exists to be handed back, and a span context is a point in a trace that closed when the original send ended: redelivering under it would graft a new operation onto a finished one, where a fresh trace rooted at the replay is what an operator can actually read.
An operator who wants the attribution durably has the seam for it already —
subscribe to DeadLetter on the event stream and write what you choose
where you choose, under your own retention. Widening the entry would make
that decision for every deployment.
Properties
Section titled “Properties”
readonlyid:string
Defined in: src/deadletters/DeadLetterEntry.ts:70
Stable identity, assigned at capture and preserved across a restart.
payload
Section titled “payload”
readonlypayload:DeadLetterPayload
Defined in: src/deadletters/DeadLetterEntry.ts:77
recipientPath
Section titled “recipientPath”
readonlyrecipientPath:string
Defined in: src/deadletters/DeadLetterEntry.ts:74
Path of the actor the message failed to reach.
replayCount
Section titled “replayCount”
readonlyreplayCount:number
Defined in: src/deadletters/DeadLetterEntry.ts:88
How many times this letter has already been replayed and come back.
Not a diagnostic afterthought: a replayed message that fails again
returns to the queue, and without carrying the count forward it would
arrive as a new entry with a new id, so an operator retrying a poison
message would grow the queue one entry per attempt while every
individual retry looked like a first one. maxReplays is checked
against this.
senderPath
Section titled “senderPath”
readonlysenderPath:string|null
Defined in: src/deadletters/DeadLetterEntry.ts:76
Path of the sender, or null when the send carried none.
timestampMs
Section titled “timestampMs”
readonlytimestampMs:number
Defined in: src/deadletters/DeadLetterEntry.ts:72
Wall-clock capture time, in epoch milliseconds.
