badaiaqrandista commented on a change in pull request #8644:
URL: https://github.com/apache/kafka/pull/8644#discussion_r434168481



##########
File path: clients/src/main/java/org/apache/kafka/clients/ClientUtils.java
##########
@@ -108,10 +108,15 @@ public static ChannelBuilder 
createChannelBuilder(AbstractConfig config, Time ti
 
     static List<InetAddress> resolve(String host, ClientDnsLookup 
clientDnsLookup) throws UnknownHostException {
         InetAddress[] addresses = InetAddress.getAllByName(host);
-        if (ClientDnsLookup.USE_ALL_DNS_IPS == clientDnsLookup) {
-            return filterPreferredAddresses(addresses);
-        } else {
-            return Collections.singletonList(addresses[0]);
+        switch (clientDnsLookup) {
+            case DEFAULT:
+                log.warn("Configuration 'client.dns.lookup' value 'default' is 
deprecated and will be removed in the future version.");

Review comment:
       I'm adding the check and the warning to the constructor of 
KafkaProducer, KafkaConsumer and KafkaAdminClient because the log context does 
not exist in the Config classes.




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

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


Reply via email to