Published On Apr 10, 2024
How to use Microsoft.Extensions.DependencyInjection to inject things into Akka.NET actors and actors into other things! This video leverages Akka.Hosting, our "pit of success" pattern for integrating Akka.NET with the rest of the Microsoft.Extensions ecosystem, to make DI with Akka.NET a breeze.
Akka.Hosting: https://github.com/akkadotnet/Akka.Ho...
Akka.NET: https://getakka.net/
Blog Post: https://petabridge.com/blog/akkadotne...
(00:00) Akka.Hosting and Microsoft.Extensions.DependencyInjection
(00:48) Installing Akka.Hosting
(01:23) Akka.DependencyInjection
(02:43) DI with Akka.Hosting [Much Easier]
(04:05) Injecting Actors with IRequiredActor[T]
(05:44) Asynchronously Waiting for Actors
(06:35) Mixing DI'd and Non-DI'd Arguments
(07:54) Scoped + Transient Dependencies with Actors
(09:26) Recap + Akka.Templates