DistributedPubSub
此内容尚不支持你的语言。
Defined in: src/cluster/pubsub/DistributedPubSubExtension.ts:24
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.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new DistributedPubSub(
system):DistributedPubSub
Defined in: src/cluster/pubsub/DistributedPubSubExtension.ts:28
Parameters
Section titled “Parameters”system
Section titled “system”Returns
Section titled “Returns”DistributedPubSub
Accessors
Section titled “Accessors”mediator
Section titled “mediator”Get Signature
Section titled “Get Signature”get mediator():
ActorRef<MediatorMessage>
Defined in: src/cluster/pubsub/DistributedPubSubExtension.ts:73
The ref of the mediator — throws if start() hasn’t been called.
Returns
Section titled “Returns”ActorRef<MediatorMessage>
Methods
Section titled “Methods”isStarted()
Section titled “isStarted()”isStarted():
boolean
Defined in: src/cluster/pubsub/DistributedPubSubExtension.ts:78
Returns
Section titled “Returns”boolean
start()
Section titled “start()”start(
cluster,options?):ActorRef<MediatorMessage>
Defined in: src/cluster/pubsub/DistributedPubSubExtension.ts:35
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.
Parameters
Section titled “Parameters”cluster
Section titled “cluster”options?
Section titled “options?”DistributedPubSubOptions = ...
Returns
Section titled “Returns”ActorRef<MediatorMessage>
