These are chat archives for akkadotnet/akka.net
Good Morning all,
I'm working on clustering for the first time and I am getting some errors when I kill and restart a node (via killing the node process and then restarting it). Below is how I am getting an actor ref at startup, which works fine, but when either node is removed and re-added to the cluster I get disassociation errors and the systems can no longer send messages to each other. Is there a better way to get those actor refs or send messages to a specific actor in a cluster from another node in that cluster?
It's important to note that I am communicating between two different projects, an API project and our main actor system project.
var actorSelection = MyActorSystem.Current.ActorSelection(appSettingsActorConfig.GetActorUrl("MyActor")); var systemResponse = actorSelection.Ask<ActorIdentity>(ident).Result; SystemActors.MyActor = systemResponse.Subject;
Tellover actor selection directly. It's a bit slower and won't verify if actor actually existed before trying to communicate with it (but this can be solved with ack messages). But actor selections don't care if destination actor will die and get ressurected later
Taskit returns finish
Ok @Aaronontheweb sorry I am still having issues, I enabled the split brain resolver and am trying out just the static-quorum, but I am still unable to communicate with a node after it leaves the cluster and comes back. I'm getting the following:
Resolve of path sequence [/user/myactorcoordinator#1845622221] failed
This is because when I store my actor refs to the core actor system TLAs in my web API project on startup they have their Uid's appended to their path in the actor identity result:
var selection = HubSystem.Current.ActorSelection(appSettingsActorConfig.GetActorUrl("MyActorCoordinator")); var ident = new Identify(this.GetHashCode()); var response = selection.Ask<ActorIdentity>(ident).Result;
So each time I restart the actor system it gets all new Uid's and my previous static references are now incorrect. So it's not my actor systems staying up thats the issue, its just my references to my actors becoming out of date. Should I not be using the result of that ActorIdentity ask and instead just use the ActorSelection that doesn't include the Uid?
ActorSelectionthat uses just the
Ok that makes sense, this grabs the actor system with just the address and path:
But then we proceeded to use the identity result instead, I believe just to make sure it was running and we got a response.
Senderof the message?