February 2018
Intermediate to advanced
552 pages
13h 46m
English
In this section, we will compare the two important components of an Akka Actor:
val actorRef:ActorRef = actorSystem.actorOf(Props[SimpleActor],"SimpleActor")
As the outside world cannot interact with an Actor object directly, an outside Actor or a non-Actor can interact with another Actor indirectly using this ActorRef. When we create another Actor, ActorSystem returns a different ActorRef to that newly created Actor.
ActorRef is the same for a single Actor. It does not change during an Actor lifecycle. Two different Actor objects cannot have the same ActorRef.
Read now
Unlock full access