I'm learning Akka. Let's say we have several Student actors who ask questions in English, several Teacher actors who answer in Portuguese and just one Translator actor, like in the diagram below.
How can I correlate the questions with their answers?
- Should I keep a correlation list as a state in Translator actor?
- Should I add the full path of the Student actor as a field in the message payload, so Translator actor can find the student who asked the question (using actorSelection method of ActorSystem)?
- Does Akka has some built-in feature that automatically keeps track of the "call stack"?
- Other way?
PS. In this example, there are only three types of actors, but let's also consider we can have lots of others actors between them.