If I have a setup like below, let's say I'll have 3 nodes joined to a cluster, and I use round robin pool.
var worker = cluster.ActorOf(Props.Create<Worker>().WithRouter(
new ClusterRouterPool(
new RoundRobinPool(5),
new ClusterRouterPoolSettings(30, true, 1))), "worker");
The "worker" simply remembers how many messages it has processed like below
public class Worker : TypedActor, IHandle<int> {
readonly List<int> processed;
public Worker()
{
processed = new List<int>();
}
public void Handle(int message)
{
System.Threading.Thread.Sleep(new Random().Next(1000, 2000));
processed.Add(message);
Console.WriteLine("WORKER ({0}) [{1}:{2}], processed: {3}", message, Context.Self.Path, Cluster.Get(Context.System).SelfUniqueAddress.Address.Port, processed.Count);
}
Is there anyway to synchronize the "processed List" between different actors on different cluster nodes? Is this something that akka.net.cluster.sharding will eventually do? Or am I doing something which totally makes no sense?