You should use a hierarchy - launch that Collector
as a child of the ExecutorMaster
.
What you are doing inside the receive
method is attempting to create an actor having the same name as another one that gets created after the first message that the ExecutorMaster
receives.
Consider using:
val collector = context.actorOf(Props[Collector], name = "Collector")
def receive = {
case _ => collector ! true
}
You also ought to use a case object
and not a primitive to identify the meaning of true
.