Skip to content

DistributedPubSub

Defined in: src/cluster/pubsub/DistributedPubSubExtension.ts:27

System-wide access to the DistributedPubSubMediator for a given Cluster. Call DistributedPubSub.get(system, cluster).mediator to grab a ref and send Subscribe / Publish / … messages to it.

new DistributedPubSub(system): DistributedPubSub

Defined in: src/cluster/pubsub/DistributedPubSubExtension.ts:31

ActorSystem

DistributedPubSub

get mediator(): ActorRef<MediatorMessage>

Defined in: src/cluster/pubsub/DistributedPubSubExtension.ts:59

The ref of the mediator — throws if start() hasn’t been called.

ActorRef<MediatorMessage>

isStarted(): boolean

Defined in: src/cluster/pubsub/DistributedPubSubExtension.ts:64

boolean


start(cluster, settings?): ActorRef<MediatorMessage>

Defined in: src/cluster/pubsub/DistributedPubSubExtension.ts:38

Bind the mediator to a specific Cluster. Idempotent per Cluster — re-binding to the same cluster is a no-op; re-binding to a different cluster throws.

Cluster

Partial<Omit<DistributedPubSubSettings, "cluster">> = {}

ActorRef<MediatorMessage>