Skip to content

DnsExt doesn't respect IDnsProvider.ManagerClass and always uses hard-coded SimpleDnsManager #7726

@anpin

Description

@anpin

DnsExt doesn't respect IDnsProvider.ManagerClass and always uses hard-coded SimpleDnsManager

Related to akkadotnet/Akka.Management#3365

return _manager = _manager ?? _system.SystemActorOf(Props.Create(() => new SimpleDnsManager(this))

For example with such config

akka.io.dns.resolver = async-dns
akka.io.dns.async-dns.provider-object = MyCustomDnsProviderFQDNClass, MyCustomDnsProviderAssembly 

and such class

public class MyCustomDnsProviderFQDNClass : IDnsProvider
{
    private readonly DnsBase _cache = new SimpleDnsCache();
    public DnsBase Cache => _cache;
    public Type ActorClass => typeof (DnsClientActor);
    public Type ManagerClass => typeof (DnsClientManager);
}

DnsExt will still use SimpleDnsManager. However SimpleDnsManager will use custom IDnsProvider.ActorClass and it will be instantiated if constructor has the same signature, but it will fail to work if messages sent to the SimpleDnsManager have different type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions