Skip to main content

Module mailbox

Module mailbox 

Source
Expand description

Mailboxes: where messages wait for an actor, independently of its activations.

A mailbox keeps messages in arrival order, which preserves the order of every single sender. Mailbox::receive hands out the oldest message that is not in flight and not deferred by the receiver’s active states, and marks it in flight; Mailbox::ack removes it once its turn is durable; Mailbox::release puts it back when the turn failed, so it is delivered again. Deferred messages are skipped, never removed, so they keep their place.

Structs§

Envelope
A message on its way to an actor.
MailboxError
A mailbox failure.
MemoryMailbox
An in-memory mailbox; its messages are lost with the process.
MemoryMailboxes
In-memory mailboxes.
StoreMailbox
A mailbox kept in the actor’s graph store, in graph <address>/mailbox: it survives restarts, and its messages are delivered again in their original order.
StoreMailboxes
Store-backed mailboxes on a node’s storage.

Traits§

Mailbox
The mailbox contract: enqueue, ordered receive with deferral, and acknowledge.
MailboxFactory
Creates the mailbox of an address.

Functions§

is_deferred
True when an event named name matches one of the vt:defer descriptors.