Finer grain control over ActorSystem startup
Arkatufus opened this issue · 1 comments
Arkatufus commented
Is your feature request related to a problem? Please describe.
Right now, there is no proper programmatic way to defer/modify ActorSystem hosted service startup, everything is started immediately on host application start up.
Describe the solution you'd like
A way for users to modify/override the IHostedService.StartAsync()
and IHostedService.StopAsync()
methods.
Arkatufus commented
Possible solution:
- Convert
AkkaHostingService
topublic abstract
and expose some of the properties asprotected
. - Add a new
AddAkka
extension method that have this method fingerprint:public static IServiceCollection AddAkka<T>( this IServiceCollection services, string actorSystemName, Action<AkkaConfigurationBuilder, IServiceProvider> builder) where T: AkkaHostedService