Nexus API Reference

DeadLetterRef
in package
implements ActorRef

FinalYes
Tags
psalm-api

Null-object ActorRef that captures dead letters.

Messages sent via tell() are captured in an internal list for inspection. ask() immediately throws AskTimeoutException. isAlive() always returns false.

implements

ActorRef

Table of Contents

Interfaces

ActorRef
Type-safe reference to an actor — the only handle user code holds.

Methods

__construct()  : mixed
ask()  : Future<string|int, R>
Send a message and get a Future for the reply.
captured()  : array<int, object>
isAlive()  : bool
Return true if the actor is still running and able to receive messages.
path()  : ActorPath
Return the hierarchical path that uniquely identifies this actor in the system.
tell()  : void
Send a message to the actor without waiting for a reply (fire-and-forget).

Methods

captured()

public captured() : array<int, object>
Return values
array<int, object>

isAlive()

Return true if the actor is still running and able to receive messages.

public isAlive() : bool

Returns false once the actor has stopped or its mailbox has been closed. Messages sent to a stopped actor are forwarded to dead letters.

Return values
bool

path()

Return the hierarchical path that uniquely identifies this actor in the system.

public path() : ActorPath

Paths have the form /user/parent/child and are stable for the lifetime of the actor. They appear in log output and are used as routing keys in the worker pool and cluster layers.

Return values
ActorPath

tell()

Send a message to the actor without waiting for a reply (fire-and-forget).

public tell(object $message) : void

The message is enqueued in the actor's mailbox and processed asynchronously. This method never blocks and always returns immediately.

Parameters
$message : object

        
On this page

Search results