Search code examples
scaladependency-injectionakkaactor

Dependency injection with Akka


I use Guice in my application quite a lot. Recently i start to learn akka actors and felt like refactoring my application with it.

However upfront i am already wondering how all my guice will work with actors. I went on searching on google and it is kinda a bit messy.

The most up to date docs that i have found on the subject are theses:

http://letitcrash.com/post/55958814293/akka-dependency-injection

http://eng.42go.com/tag/guice/

which do not advocate same thing.

I must confess i still need to read a lot, i am at the beginning of learning akka. I Did few examples and red few things, but i don't want to go to deep into something to realize later that i will have many problems.

So my question is as of today, what is the consensus on how to use Akka Actors with dependency injection.

What kind of injection is possible ? Can we wire actors with object/other actors/....

Can anyway please outline in a concise way something that can help me to understand what is possible and what is the best practices ?


Solution

  • The latest activator has a tutorial for Akka with Guice.