final class Murmur2MessageExtractor[M] extends ShardingMessageExtractor[ShardingEnvelope[M], M]
Ordering
- Alphabetic
- By Inheritance
Inherited
- Murmur2MessageExtractor
- ShardingMessageExtractor
- AnyRef
- Any
Implicitly
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- def entityId(envelope: ShardingEnvelope[M]): String
Extract the entity id from an incoming
message
.Extract the entity id from an incoming
message
. Ifnull
is returned the message will beunhandled
, i.e. posted asUnhandled
messages on the event stream- Definition Classes
- → ShardingMessageExtractor
- val numberOfShards: Int
- def shardId(entityId: String): String
The shard identifier for a given entity id.
The shard identifier for a given entity id. Only messages that passed the ShardingMessageExtractor#entityId function will be used as input to this function.
- Definition Classes
- → ShardingMessageExtractor
- def unwrapMessage(envelope: ShardingEnvelope[M]): M
Extract the message to send to the entity from an incoming
message
.Extract the message to send to the entity from an incoming
message
. Note that the extracted message does not have to be the same as the incoming message to support wrapping in message envelope that is unwrapped before sending to the entity actor.- Definition Classes
- → ShardingMessageExtractor
The murmur2 message extractor uses the same algorithm as the default kafka partitioner allowing kafka partitions to be mapped to shards. This can be used with the akka.cluster.sharding.external.ExternalShardAllocationStrategy to have messages processed locally.
Extend Murmur2NoEnvelopeMessageExtractor to not use a message envelope extractor.