Reply to GetCurrentRegions
Reply to GetCurrentRegions
Marker type of entity identifier (String
).
Interface of the partial function used by the ShardRegion to extract the entity id and the message to send to the entity from an incoming message.
Interface of the partial function used by the ShardRegion to
extract the entity id and the message to send to the entity from an
incoming message. The implementation is application specific.
If the partial function does not match the message will be
unhandled
, i.e. posted as Unhandled
messages on the event stream.
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.
Interface of the function used by the ShardRegion to extract the shard id from an incoming message.
Interface of the function used by the ShardRegion to extract the shard id from an incoming message. Only messages that passed the ExtractEntityId will be used as input to this function.
Convenience implementation of ShardRegion.MessageExtractor that
construct shardId
based on the hashCode
of the entityId
.
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
.
Java API: Interface of functions to extract entity id, shard id, and the message to send to the entity from an incoming message.
Marker type of application messages (Any
).
If the state of the entities are persistent you may stop entities that are not used to reduce memory consumption.
If the state of the entities are persistent you may stop entities that are not used to
reduce memory consumption. This is done by the application specific implementation of
the entity actors for example by defining receive timeout (context.setReceiveTimeout
).
If a message is already enqueued to the entity when it stops itself the enqueued message
in the mailbox will be dropped. To support graceful passivation without loosing such
messages the entity actor can send this Passivate
message to its parent ShardRegion
.
The specified wrapped stopMessage
will be sent back to the entity, which is
then supposed to stop itself. Incoming messages will be buffered by the ShardRegion
between reception of Passivate
and termination of the entity. Such buffered messages
are thereafter delivered to a new incarnation of the entity.
akka.actor.PoisonPill is a perfectly fine stopMessage
.
Marker type of shard identifier (String
).
We must be sure that a shard is initialized before to start send messages to it.
We must be sure that a shard is initialized before to start send messages to it. Shard could be terminated during initialization.
Java API: Send this message to the ShardRegion
actor to handoff all shards that are hosted by
the ShardRegion
and then the ShardRegion
actor will be stopped.
Java API: Send this message to the ShardRegion
actor to handoff all shards that are hosted by
the ShardRegion
and then the ShardRegion
actor will be stopped. You can watch
it to know when it is completed.
ClusterSharding extension