Distributes a static list of entities evenly over a cluster, ensuring that they are all continuously active.
Settings for cluster distribution.
Settings for cluster distribution.
The cluster sharding settings.
The interval at which entities are ensured to be active.
Performs an idempotent task on one node on cluster startup.
Performs an idempotent task on one node on cluster startup.
The task guarantees that when the actor is asked to perform the operation, the operation will only be executed on one node of the cluster at a time, and that when the returned future is redeemed, the task will be performed.
This will start a cluster singleton which will execute the task. The task may be executed again when a new node becomes the singleton, hence the task must be idempotent.
If the task fails, it will be re-executed using exponential backoff using the given backoff parameters.
Distributes a static list of entities evenly over a cluster, ensuring that they are all continuously active.
This uses cluster sharding underneath, using a scheduled tick sent to each entity as a mechanism to ensure they are active.
Entities are cluster sharding entities, so they can discover their ID by inspecting their name. Additionally, entities should handle the com.lightbend.lagom.internal.persistence.cluster.ClusterDistribution.EnsureActive message, typically they can do nothing in response to it.