chia7712 commented on code in PR #21080:
URL: https://github.com/apache/kafka/pull/21080#discussion_r2954621012
##########
clients/src/main/java/org/apache/kafka/clients/ClientUtils.java:
##########
@@ -228,6 +282,20 @@ public static NetworkClient
createNetworkClient(AbstractConfig config,
metricsGroupPrefix,
channelBuilder,
logContext);
+ ClientDnsLookup dnsLookup =
ClientDnsLookup.forConfig(config.getString(CommonClientConfigs.CLIENT_DNS_LOOKUP_CONFIG));
+
+ // Validate bootstrap servers if provided (non-empty list)
+ // This allows configurations that don't use bootstrap (e.g.,
broker-to-broker) to skip validation
+ if (bootstrapServers != null && !bootstrapServers.isEmpty()) {
+ parseAndValidateAddresses(bootstrapServers, dnsLookup);
+ }
+
+ bootstrapConfiguration = new NetworkClient.BootstrapConfiguration(
+ bootstrapServers != null ? bootstrapServers : List.of(),
+ dnsLookup,
+ CommonClientConfigs.DEFAULT_BOOTSTRAP_RESOLVE_TIMEOUT_MS,
Review Comment:
Should we honour `bootstrap.resolve.timeout.ms` here?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]