You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/04/20 03:34:52 UTC

[GitHub] [pulsar] lhotari commented on a diff in pull request #15219: [Proxy & Client] Configure Netty DNS resolver to match JDK DNS caching setting, share DNS resolver instance in Proxy

lhotari commented on code in PR #15219:
URL: https://github.com/apache/pulsar/pull/15219#discussion_r853697985


##########
pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/ProxyConnectionPool.java:
##########
@@ -19,40 +19,18 @@
 package org.apache.pulsar.proxy.server;
 
 import io.netty.channel.EventLoopGroup;
-import java.io.IOException;
-import java.util.concurrent.ExecutionException;
+import io.netty.resolver.dns.DnsNameResolver;
+import java.util.Optional;
 import java.util.function.Supplier;
 import org.apache.pulsar.client.api.PulsarClientException;
 import org.apache.pulsar.client.impl.ClientCnx;
 import org.apache.pulsar.client.impl.ConnectionPool;
 import org.apache.pulsar.client.impl.conf.ClientConfigurationData;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 public class ProxyConnectionPool extends ConnectionPool {
     public ProxyConnectionPool(ClientConfigurationData clientConfig, EventLoopGroup eventLoopGroup,
-            Supplier<ClientCnx> clientCnxSupplier) throws PulsarClientException {
-        super(clientConfig, eventLoopGroup, clientCnxSupplier);
+                               Supplier<ClientCnx> clientCnxSupplier, DnsNameResolver dnsNameResolver)
+            throws PulsarClientException {
+        super(clientConfig, eventLoopGroup, clientCnxSupplier, Optional.of(dnsNameResolver));

Review Comment:
   Yes, I did this.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org