Class ShardingMessageExtractor$
java.lang.Object
org.apache.pekko.cluster.sharding.typed.ShardingMessageExtractor$
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ShardingMessageExtractor$Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<M> ShardingMessageExtractor<ShardingEnvelope<M>,M> apply(int numberOfShards) Scala API:<M> ShardingMessageExtractor<M,M> noEnvelope(int numberOfShards, M stopMessage, scala.Function1<M, String> extractEntityId) Scala API: Create a message extractor for a protocol where the entity id is available in each message.
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
ShardingMessageExtractor$
public ShardingMessageExtractor$()
-
-
Method Details
-
apply
Scala API:Create the default message extractor, using envelopes to identify what entity a message is for and the hashcode of the entityId to decide which shard an entity belongs to.
This is recommended since it does not force details about sharding into the entity protocol
-
noEnvelope
public <M> ShardingMessageExtractor<M,M> noEnvelope(int numberOfShards, M stopMessage, scala.Function1<M, String> extractEntityId) Scala API: Create a message extractor for a protocol where the entity id is available in each message.
-