I want to use Guice Dependency Injection with Akka Actors.
Akka documentation, here, suggests to use
IndirectActorProducer for dependency injection.
But it is not explained, or I don't understand, the reason.
In my opinion it should be used to avoid passing not serializable components/services inside Props. But other examples that I have found (here or here) pass the whole
Injector class that I'm quite sure it is not serializable.
So my questions are:
- How and why
IndirectActorProducershould be used?
Propsmust be serializable? It is fine to pass Guice
Injectoras a Props parameters?
I known that there are similar questions, but in my opinion there isn't a clear answer yet: