[akka-user] Passing message between akka actors

2016-01-20 Thread Karthik Deivasigamani
Hi, I have a use case where I have to pass message between actors and send a response back to the caller. Once I get a request I invoke Actor A, which will do some DB call and return results. But in certain cases actor A has to invoke actor B and get some results from Actor B. It then has to

Re: [akka-user] Passing message between akka actors

2016-01-20 Thread Michael Frank
passing around an ActorRef is safe, because an ActorRef is an immutable structure: http://doc.akka.io/api/akka/2.4.1/akka/actor/ActorRef.html there is an alternative however, which i think is less 'leaky'. in the handling of Request in actor A, you can use ask() and pipeTo(): def receive = {

Re: [akka-user] Passing message between akka actors

2016-01-20 Thread Karthik Deivasigamani
Thanks Michael. That was very helpful. ~ Karthik On Wednesday, January 20, 2016 at 10:27:45 AM UTC-8, Michael Frank wrote: > > passing around an ActorRef is safe, because an ActorRef is an immutable > structure: http://doc.akka.io/api/akka/2.4.1/akka/actor/ActorRef.html > > there is an alternativ