showuon commented on code in PR #17524: URL: https://github.com/apache/kafka/pull/17524#discussion_r1858477234
########## clients/src/main/java/org/apache/kafka/clients/admin/KafkaAdminClient.java: ########## @@ -2557,7 +2557,10 @@ boolean handleUnsupportedVersionException(final UnsupportedVersionException exce return false; } - if (exception.getMessage().contains("Including fenced broker endpoints is not supported with version")) { + // If unsupportedVersion exception was caused by the option to include fenced brokers (only supported for version 1+) + // then we should not fall back to the metadataRequest. + if (options.includeFencedBrokers()) { + log.error("Including fenced broker endpoints is not supported with " + exception.getMessage()); Review Comment: I'm not sure the exception message when unsupportedVersionException thrown. You need to check again in integration test. The `Api DESCRIBE_CLUSTER with version 1` is from `mockClient`, not real `networkClient`. FYI. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org