The answer to this can be easily found in the Akka documentation:
The actor system is usually started by creating actors under the guardian, using the ActorSystem.actorOf method, and then using the ActorContext.actorOf from the created participants to create a player tree.
- Actors created using
System.actorOf will be the children of the guardian actor. - Actors created using
context.actorOf will be children of the context itself, i.e. the actor calling the method.
As a more general suggestion, make sure you carefully study the Akka docs when looking for similar answers.
source share