-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
Milestone
Description
DnsExt doesn't respect IDnsProvider.ManagerClass and always uses hard-coded SimpleDnsManager
Related to akkadotnet/Akka.Management#3365
akka.net/src/core/Akka/IO/Dns.cs
Line 278 in c10cfc1
| 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.