Class Passivate
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 (SetReceiveTimeout(Nullable<TimeSpan>)). 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 losing 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.
Instance is a perfectly fine StopMessage.
Implements
Inherited Members
Namespace: Akka.Cluster.Sharding
Assembly: Akka.Cluster.Sharding.dll
Syntax
[Serializable]
public sealed class Passivate : IShardRegionCommand
Constructors
| Improve this Doc View SourcePassivate(Object)
TBD
Declaration
public Passivate(object stopMessage)
Parameters
Type | Name | Description |
---|---|---|
Object | stopMessage | TBD |
Properties
| Improve this Doc View SourceStopMessage
TBD
Declaration
public object StopMessage { get; }
Property Value
Type | Description |
---|---|
Object |