Packages

c

akka.cluster.sharding.typed

ShardingEnvelope

final case class ShardingEnvelope[M](entityId: String, message: M) extends Product with Serializable

Default envelope type that may be used with Cluster Sharding.

Cluster Sharding provides a default HashCodeMessageExtractor that is able to handle these types of messages, by hashing the entityId into into the shardId. It is not the only, but a convenient way to send envelope-wrapped messages via cluster sharding.

The alternative way of routing messages through sharding is to not use envelopes, and have the message types themselves carry identifiers.

Source
ShardingMessageExtractor.scala
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ShardingEnvelope
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ShardingEnvelope(entityId: String, message: M)

Value Members

  1. val entityId: String
  2. val message: M