I\'m playing around with Actor Routing and I can\'t send a reply back to the router so that another actor in the routing list can pick this up. I\'m using:
s
Your problem is that your routees are not created by the router itself but by the Akka system with :
system.actorOf(Props[Employee], "Penny")
Therefore context.parent
at the employee level will return the Akka system which will redirect your messages to the dead-letters mailbox.
EDIT : According the documentation, see the section Routers, Routees and Senders which states explicitly
Note that different code would be needed if the routees were
not children of the router, i.e. if they were provided when the router was created.
This is exactly your situation, you are building your employees actors under the system actor and then you pass the ActorRef list as an argument of to the router's constructor.