Pular para o conteúdo
Português (BR)

MailboxDropObserver

Este conteúdo não está disponível em sua língua ainda.

MailboxDropObserver<T> = (reason, envelope) => void

Defined in: src/internal/Mailbox.ts:200

What a DropReportingMailbox hands an observer when it discards a message: the reason, and the envelope that was discarded (#773).

A type rather than an interface because it is one callback’s shape and prescribes nothing anyone implements.

The envelope is the half that makes the loss recoverable: message and sender are what a DeadLetter is built from, and context / trace are what attribute it to the request that produced it. Before #773 the seam carried the reason alone, so the only mailbox in the framework that discards messages was also the only loss path that could not say what it had lost.

T = unknown

MailboxDropReason

Envelope<T>

void