So i have started learning Akka and trying out the examples in typesafe. So the Hello Akka app has the following code :
import akka.actor.{ ActorRef, Act
When you do the following you are dealing directly with an ActorRef
greeter.tell(WhoToGreet("akka"), ActorRef.noSender)
On the other hand, when you use an Inbox
you are dealing something that is not exactly an actor but actor-like. One scenario where this is helpful is when you don't want to create your own actor but still want to interact with other actors asynchronously. Please see this
An Inbox is an actor-like object which is interrogated from the outside. It contains an actor whose reference can be passed to other actors as usual and it can watch other actors’ lifecycle.
The actor runs on the a threadpool (configured using a dispatcher). You can decide either by configuration or by putting in your code where which dispatcher that actor use for its execution.