From ccf31035019307e12435344b8c7c870f4d6270ca Mon Sep 17 00:00:00 2001 From: Roman Zabaluev Date: Sat, 17 Feb 2024 18:47:47 +0700 Subject: [PATCH] Topics: Fix config fetch for Azure EH (#105) Co-authored-by: Aleksei Zotov --- .../java/io/kafbat/ui/service/ReactiveAdminClient.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/io/kafbat/ui/service/ReactiveAdminClient.java b/api/src/main/java/io/kafbat/ui/service/ReactiveAdminClient.java index 4c345d633..4b22a930c 100644 --- a/api/src/main/java/io/kafbat/ui/service/ReactiveAdminClient.java +++ b/api/src/main/java/io/kafbat/ui/service/ReactiveAdminClient.java @@ -77,6 +77,7 @@ import org.apache.kafka.common.errors.InvalidRequestException; import org.apache.kafka.common.errors.SecurityDisabledException; import org.apache.kafka.common.errors.TopicAuthorizationException; +import org.apache.kafka.common.errors.UnknownServerException; import org.apache.kafka.common.errors.UnknownTopicOrPartitionException; import org.apache.kafka.common.errors.UnsupportedVersionException; import org.apache.kafka.common.requests.DescribeLogDirsResponse; @@ -246,8 +247,10 @@ public Mono>> getTopicsConfig() { return listTopics(true).flatMap(topics -> getTopicsConfig(topics, false)); } - //NOTE: skips not-found topics (for which UnknownTopicOrPartitionException was thrown by AdminClient) - //and topics for which DESCRIBE_CONFIGS permission is not set (TopicAuthorizationException was thrown) + /* + NOTE: skips not-found topics (for which UnknownTopicOrPartitionException or UnknownServerException was thrown by + AdminClient) and topics for which DESCRIBE_CONFIGS permission is not set (TopicAuthorizationException was thrown) + */ public Mono>> getTopicsConfig(Collection topicNames, boolean includeDoc) { var includeDocFixed = includeDoc && getClusterFeatures().contains(SupportedFeature.CONFIG_DOCUMENTATION_RETRIEVAL); // we need to partition calls, because it can lead to AdminClient timeouts in case of large topics count @@ -269,6 +272,7 @@ private Mono>> getTopicsConfigImpl(Collection config.entrySet().stream() .collect(toMap(