0
votes

I have a question related to Akka 2.0.1 in the Java API. I have the following situation:

Actor A: Receives a request from the UI. It will then do the following.

  1. Wait for message from UI
  2. Send msg to Actor B, to retrieve data
  3. Become an actor which is handling the answer from actor B, when it has been retrieved.

Actor B:

  1. Wait for message from Actor A.
  2. Retrieves data
  3. Calls getSender().tell(xxx);

This doesn't work, and the Actor A will not received the answer. If however Actor B is using the global actorRef to Actor A in the system, in my case zzz.eventCaller.tell(xxx) it will however work.

Is is me who have missed some basic stuff, or is this expected behavior or a bug?

1
I'm so bad at guessing what peoples code looks like...Viktor Klang
I will add example if I ever get problems understanding Akka again.StefanE

1 Answers

1
votes

Since you didn't provide the actual code, you sort of left me to guess what your problem might be. The Akka Java API has no way of tracking senders unless you provide them:

recipient.tell(message, getSelf());

I hope that helps.