Zum Inhalt springen
Deutsch

PriorityMailboxOverflow

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

PriorityMailboxOverflow = "drop-lowest-priority" | "drop-new" | "reject"

Defined in: src/mailbox/PriorityMailboxOptions.ts:20

What a PriorityMailbox does when a message arrives on a full one.

A deliberate near-miss of BoundedMailboxOverflow rather than a reuse of it, and the difference is the first member. On a FIFO queue drop-head means “discard the stalest”, which is coherent because arrival order is the only order there is. A priority queue’s head is the message the priority function said matters most — discarding it would defeat the reason the mailbox was chosen — so the word cannot be carried over with its meaning intact, and carrying it over with a different meaning is worse than a second name.

The two policies that mean the same thing on both queues keep their names.