I used to use a Java Future object and Await.result to get a response from an Akka actor. This allowed me to create a bridge between the Java 6 code base and Akka.
Disadvantages : blocking threads during long tasks
I switched to Java 8 and was looking for non-blocking support to replace Await.result callback. Theoretically, this will work well. However, I notice in the latest version of the HelloAkka virtualization tutorial with Java 8 that Akka Inbox is used to process the response, not the future;
- Is Inbox Preferred For The Future?
- When will the future (or the full future) become a better option?
source share