These are chat archives for akkadotnet/akka.net
Hey Guys. So i am working on a project with two Cluster Singleton's and proxies.
To keep this simple, lets assume 2 different processes, joined in a cluster, and 2 actors, Actor1 and Actor2, running as a singleton on each process. Each process has a role defined, Process1 = RoleProcess2, Process2 = RoleProcess2. When creating the Actor1 Singleton on Proces1, I am specifying RoleProcess1 so that it is bound to that process only, I do the same for Process2 with roles changed. This works as expected and the singletons are created.
I then need to create a proxy on each process referring to the other. For example, on Process2, I create a SingletonProxy that points to the Actor1 Singleton on Process1. I had previously been configuring this with a role of RoleProcess2 as that is the process that I wanted the proxy bound to, but this does not ever identify the singleton. After quite a bit of messing around, it seems that I need to configure the Proxy role to the same as the ClusterSingleton, RoleProcess1 in this example, at which point it works just fine.
This seems a bit arse about face to me. Is this correct, and could someone help with the reasoning behind this?
I can pop over a single class example of all of the above if it helps.
process1living on nodes with role
process2living on nodes with role
RoleProcess2, if process1 wants to talk to process2 it should use singleton proxy configured to
RoleProcess2as this is where process2 can be found.
ReceiveTimeoutmessage to itself. You can then stop that actor as reaction on that event.