/akka-actor-di-guice

A minimal Akka Actor example using Guice for dependency injection.

Primary LanguageScala

akka-actor-di-guice

A minimal Akka Actor example using Guice for dependency injection.

Features:

  • Inject actors to other components (see App.scala where I inject PrinterActor)
  • Create child actors (see PrinterActor.scala where I create PrintJobActor using a factory)
  • Inject components inside actors (see PrintJobActor.scala where I inject PrinterService 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.

References