abstract class ShardingMessageExtractor[E, M] extends AnyRef
Ordering
- Alphabetic
- By Inheritance
Inherited
- ShardingMessageExtractor
- AnyRef
- Any
Implicitly
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new ShardingMessageExtractor()
Abstract Value Members
- abstract def entityId(message: E): 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 - abstract 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.
- abstract def unwrapMessage(message: E): 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.
Entirely customizable typed message extractor. Prefer HashCodeMessageExtractor or HashCodeNoEnvelopeMessageExtractorif possible.
Possibly an Envelope around the messages accepted by the entity actor, is the same as
M
if there is no envelope.The type of message accepted by the entity actor