These are chat archives for akkadotnet/akka.net
I have a question around dependency injection. In the akka.net docs it has the following "When scoping actor type dependencies using your DI container, only TransientLifestyle or InstancePerDependency like scopes are supported. This is due to the fact that Akka explicitly manages the lifecycle of its actors. So any scope which interferes with that is not supported."
What I want to figure out is why when akka manages the lifecycle of the actors does it also needs to do the same for dependencies? We're currently starting out with Akka in a hybrid environment so are injecting current components in to the actors. We've been hitting issues where singleton components are forced to instances (in the Ninject DI library specifically via BeginBlock) so we're ending up with say multiple db connections rather than using the singleton pool?
We can implement our own DI resolver to solve this which is fine but we're intrigued to know why this is the case in the first place as it's surely not a responsibility of the Akka framework to manage it's dependencies?
Thanks in advance