HashCodeMessageExtractor

abstract class HashCodeMessageExtractor(maxNumberOfShards: Int) 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.

Companion:
object
class Object
trait Matchable
class Any

Value members

Concrete methods

override def entityMessage(message: Any): Any

Default implementation pass on the message as is.

Default implementation pass on the message as is.

Definition Classes
override def shardId(message: Any): String
Definition Classes

Inherited methods

def entityId(message: Any): String

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

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

Inherited from:
MessageExtractor