コンテンツにスキップ
日本語

MailboxDropReason

このコンテンツはまだ日本語訳がありません。

MailboxDropReason = "drop-head" | "drop-new"

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

Why a mailbox discarded a message — the reason label on actor_mailbox_dropped_total.

Deliberately a closed set of two rather than a free-form string, even for a mailbox of your own: reason is a metric label, and an open one is a cardinality vector (#745). That constraint got sharper once #658 removed path — class and reason are now the family’s only dimensions, so a free-form reason would be the single thing standing between it and unbounded growth. Pick whichever describes what you did — you dropped the oldest queued message, or you dropped the arriving one. Refusing a message is not a drop; that throws instead.

Lives here rather than in BoundedMailboxOptions.ts despite typing an option field there: it is the vocabulary of DropReportingMailbox, which every mailbox may implement, and BoundedMailbox is only the built-in one that does. The layering runs base → subclass, so the shared word belongs at the base.