private void StartSharding()
{
var allocationStrategy = new LeastShardAllocationStrategy(2, 1);
ClusterSharding.Get(Sys).Start(
typeName: "Entity",
entityProps: Props.Create<Entity>(),
settings: ClusterShardingSettings.Create(Sys),
idExtractor: extractEntityId,
shardResolver: extractShardId,
allocationStrategy: allocationStrategy,
handOffStopMessage: StopEntity.Instance);
}