abstract class HashCodeMessageExtractor extends MessageExtractor

Convenience implementation of ShardRegion.MessageExtractor that construct shardId based on the hashCode of the entityId. The number of unique shards is limited by the given maxNumberOfShards.

Source
ShardRegion.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. HashCodeMessageExtractor
  2. MessageExtractor
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new HashCodeMessageExtractor(maxNumberOfShards: Int)

Abstract Value Members

  1. abstract def entityId(message: Any): String

    Extract the entity id from an incoming message.

    Extract the entity id from an incoming message. If null is returned the message will be unhandled, i.e. posted as Unhandled messages on the event stream

    Definition Classes
    MessageExtractor

Concrete Value Members

  1. def entityMessage(message: Any): Any

    Default implementation pass on the message as is.

    Default implementation pass on the message as is.

    Definition Classes
    HashCodeMessageExtractorMessageExtractor
  2. def shardId(message: Any): String

    Extract the shard id from an incoming message.

    Extract the shard id from an incoming message. Only messages that passed the #entityId function will be used as input to this function.

    Definition Classes
    HashCodeMessageExtractorMessageExtractor