For my hierarchy of actors, I do not know all the actors that I need until I process the data with several actors, so I'm looking for a way to return an existing ActorRef or create a new action. This is what I would like the code below to create an actor if it does not exist in "my-id-1" or returns the one that already exists.
Context.ActorOf(MyActor.Props(message), "my-id-1");
The code above will (as documented) throw a InvalidActorNameException
if the actor already exists. How can I accomplish this in Akka.net?
source
share