final case class ShardingEnvelope[M](entityId: String, message: M) extends WrappedMessage with ClusterShardingTypedSerializable with Product with Serializable
Ordering
- Alphabetic
- By Inheritance
Inherited
- ShardingEnvelope
- Serializable
- Product
- Equals
- ClusterShardingTypedSerializable
- WrappedMessage
- AnyRef
- Any
Implicitly
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- new ShardingEnvelope(entityId: String, message: M)
- entityId
The business domain identifier of the entity.
- message
The message to be send to the entity.
- Exceptions thrown
`InvalidMessageException`
if message is null.
Value Members
- val entityId: String
- val message: M
- Definition Classes
- → WrappedMessage
- def productElementNames: Iterator[String]
- Definition Classes
- Product
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.
The business domain identifier of the entity.
The message to be send to the entity.
`InvalidMessageException`
if message is null.