Hi guys,
I have a sharding region that creates instances of ActorA
I want to "ask" (in order to get a synchronous reponse) the region to do
something
The problem is ActorA (that will receive the message) will dispatch the
work to ActorB and ActorC and will expect messages from them.
When ActorA receives response from B and C it can sends a reponse to the
inital sender() saying that the job is completed.
The problem is, since ActorA received messages from B and C, the initial
sender() is lost.
I cannot tell to context().parent() either because the parent of A is the
Shard.
How can I do this properly ? Should I backup the initial
sender().path().toString() and response like so
context().system().actorSelection(initialSenderPath).tell("jobCompleted",
self()) ?
Is it safe to do that ? In this case the initial sender path
is akka://MySystem/temp/$a
Or should I put the initial sender ActorRef to messages sent to B and C and
expect to get it back from them in their response ?
I know I could use ask in ActorA to send messages to B and C in order to
keep the original sender but I don't want to set timeouts everywhere.
Any idea ?
Thanks :)
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.