Skip to content

RemoteActorRef

Defined in: src/cluster/RemoteActorRef.ts:17

A ref whose target lives on a different node. tell() builds an envelope and hands it to the cluster transport. Messages MUST be JSON-safe; classes are not preserved by default (only the tag string is sent). Any ActorRef instances embedded in the message body are rewritten to wire-safe markers inside Cluster._sendEnvelope so they can be reconstructed on the receiving node.

TMsg = unknown

new RemoteActorRef<TMsg>(targetNode, targetPath, cluster): RemoteActorRef<TMsg>

Defined in: src/cluster/RemoteActorRef.ts:20

NodeAddress

string

Cluster

RemoteActorRef<TMsg>

ActorRef.constructor

readonly path: ActorPath

Defined in: src/cluster/RemoteActorRef.ts:18

ActorRef.path


readonly targetNode: NodeAddress

Defined in: src/cluster/RemoteActorRef.ts:21


readonly targetPath: string

Defined in: src/cluster/RemoteActorRef.ts:22

equals(other): boolean

Defined in: src/ActorRef.ts:26

ActorRef

boolean

ActorRef.equals


kill(): void

Defined in: src/ActorRef.ts:22

Kill this actor — raises ActorKilledError through the normal supervision path.

void

ActorRef.kill


send(message): void

Defined in: src/ActorRef.ts:16

Alias for tell — useful if you want to pipe something.

TMsg

void

ActorRef.send


stop(): void

Defined in: src/ActorRef.ts:19

Gracefully stop this actor after it drains its mailbox.

void

ActorRef.stop


tell(message, sender?): void

Defined in: src/cluster/RemoteActorRef.ts:34

Send a message to this actor. sender is surfaced as context.sender in the recipient.

TMsg

ActorRef<unknown> | null

void

ActorRef.tell


toString(): string

Defined in: src/cluster/RemoteActorRef.ts:53

string

ActorRef.toString