You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "nodece (via GitHub)" <gi...@apache.org> on 2024/11/12 07:17:06 UTC

Re: [PR] Enabling DNS retryOnTimeout with TCP in DnsNameResolver [pulsar]

nodece commented on code in PR #23590:
URL: https://github.com/apache/pulsar/pull/23590#discussion_r1837587330


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConnectionPool.java:
##########
@@ -188,7 +188,9 @@ public ConnectionPool(InstrumentProvider instrumentProvider,
     private static AddressResolver<InetSocketAddress> createAddressResolver(ClientConfigurationData conf,
                                                                             EventLoopGroup eventLoopGroup) {
         DnsNameResolverBuilder dnsNameResolverBuilder = new DnsNameResolverBuilder()
-                .traceEnabled(true).channelType(EventLoopUtil.getDatagramChannelClass(eventLoopGroup));
+                .traceEnabled(true)
+                .channelType(EventLoopUtil.getDatagramChannelClass(eventLoopGroup))
+                .socketChannelType(EventLoopUtil.getSocketChannelClass(eventLoopGroup), true);

Review Comment:
   ```suggestion
                   .socketChannelType(EventLoopUtil.getClientSocketChannelClass(eventLoopGroup), true);
   ```



-- 
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