Pulsar client use Netty DNS to resolve hostnames.
Currently Pulsar client levereage on JVM detected DNS servers or on Google DNS servers if nothing was found (as per Netty default). You cannot change which DNS use to resolve hostnames but you are forced to use local server one (like DNS servers configured through resolv.conf or similar ways) or leverage on some Netty "black magic" system properties.
The ability to directly configure which DNS use is strictly necessary in environment with "specialized" DNS servers.
Add a new configuration on Pulsar client to explicitly set which DNS use.
Fully configure DNS layer, properties, timeouts etcetera.
A new client configuration will be added to list wich DNS server use. Such configuration will be checked when creating Pulsar clients to instantiate the DNS resolver. If no configuration is provided the client must use current defaults.
The new configuration will be read from org.apache.pulsar.client.impl.ConnectionPool to configure a DnsNameResolverBuilder
Add new dnsServerAddresses method on org.apache.pulsar.client.api.ClientBuilder.
There are no breaking changes, if dnsServerAddresses is not configuret Pulsar will continue to behave like now.
NA
NA
Add new dnsServerAddresses property on org.apache.pulsar.client.impl.conf.ClientConfigurationData.
NA
NA
NA
The client will have the ability to use a different set of DNS servers. It is possible to alter hostnames resolutions however it is expected that this does not pose any security risks.
Just remove dnsServerAddresses configuration
Configure a dnsServerAddresses server list. The configuration is not mandatory, Pulsar can run without it just like before.
Expose an interface builder to fully configure the DNS layer. It has much more impact and conflict with existing configuration properties dnsLookupBindAddress and dnsLookupBindPort.
- Mailing List discussion thread: https://lists.apache.org/thread/p0870y7o6brv5y1ghn5tz9hvs24bl1k4
- Mailing List voting thread: https://lists.apache.org/thread/7dd0htk0qqkrjxztj445lj3qskxr2dky