Nexus API Reference

BackpressureCapable

An ActorRef whose sends can report mailbox admission.

tell() is fire-and-forget by contract and swallows the mailbox result. Integrations that need delivery feedback to propagate backpressure to an upstream source (for example, a message broker that should not be acked until the message is safely enqueued) use offer() instead.

Tags
psalm-api
template

Table of Contents

Methods

offer()  : EnqueueResult
Enqueue a message and report the mailbox admission result.

Methods

offer()

Enqueue a message and report the mailbox admission result.

public offer(T|SystemMessage $message) : EnqueueResult

Possible outcomes:

  • Accepted — message enqueued; caller may ack the upstream source.
  • Backpressured — bounded mailbox is full with the Backpressure overflow strategy; the message was not enqueued. Caller should pause and retry later.
  • Dropped — mailbox is closed or the overflow strategy discarded the message; it was not enqueued and will not be delivered.
Parameters
$message : T|SystemMessage
Attributes
#[NoDiscard]
Return values
EnqueueResult
On this page

Search results