public class ShardingDirectReplication$ extends java.lang.ObjectINTERNAL API
Used when sharding Replicated Event Sourced entities in multiple instances of sharding, for example one per DC in a Multi DC Akka Cluster.
This actor should be started once on each node where Replicated Event Sourced entities will run (the same nodes that you start sharding on). The entities should be set up with
ReplicatedShardingthe replication can be enabled through
ReplicatedEntityProvider.withDirectReplicationinstead of starting this actor manually.
Subscribes to locally written events through the event stream and sends the seen events to all the sharded replicas which can then fast forward their cross-replica event streams to improve latency while allowing less frequent poll for the cross replica queries. Note that since message delivery is at-most-once this can not be the only channel for replica events - the entities must still tail events from the journals of other replicas.
The events are forwarded as
ShardingEnvelopethis will work out of the box both by default and with a custom extractor since the envelopes are handled internally.
Constructors Constructor Description
All Methods Instance Methods Concrete Methods Modifier and Type Method Description
apply(java.lang.String typeName, scala.Option<ReplicaId> selfReplica, scala.collection.immutable.Map<ReplicaId,ActorRef<T>> replicaShardingProxies)
public static final ShardingDirectReplication$ MODULE$Static reference to the singleton instance of this Scala object.