A minimal Akka Actor example using Guice for dependency injection.
Features:
- Inject actors to other components (see
App.scala
where I injectPrinterActor
) - Create child actors (see
PrinterActor.scala
where I createPrintJobActor
using a factory) - Inject components inside actors (see
PrintJobActor.scala
where I injectPrinterService
component) - No named components (I don't like it...)
- Unit test friendly
All the "magic" is inside the Guice AppModule
, where actors are bind and factories are created.