Skip to content

ClusterClient

Defined in: src/cluster/ClusterClient.ts:93

Connect to a cluster via one of the listed contact-points and exchange messages with actors on the cluster. See the file header for scope.

new ClusterClient(settings): ClusterClient

Defined in: src/cluster/ClusterClient.ts:108

ClusterClientSettings

ClusterClient

get clientAddress(): NodeAddress

Defined in: src/cluster/ClusterClient.ts:131

The synthetic identity this client uses in its hello handshake.

NodeAddress

ask<R>(targetPath, message, timeoutMs?): Promise<R>

Defined in: src/cluster/ClusterClient.ts:154

Send a message and wait for a reply. Resolves with the reply body on success, rejects with an Error on path-not-found / timeout / cluster-side ask failure.

R = unknown

string

unknown

number

Promise<R>


close(): Promise<void>

Defined in: src/cluster/ClusterClient.ts:183

Close the connection. Idempotent.

Promise<void>


send(targetPath, message): Promise<void>

Defined in: src/cluster/ClusterClient.ts:138

Fire-and-forget tell to the actor at targetPath on the cluster. targetPath accepts the same shapes as ActorSystem.actorSelection: full URI, absolute path, or relative-to-/user.

string

unknown

Promise<void>