Skip to content

Commit

Permalink
Polish
Browse files Browse the repository at this point in the history
  • Loading branch information
Haarolean committed Feb 5, 2024
1 parent ed4b38b commit f14d983
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,10 @@ public Mono<Map<String, List<ConfigEntry>>> getTopicsConfig() {
return listTopics(true).flatMap(topics -> getTopicsConfig(topics, false));
}

//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)
/*
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<Map<String, List<ConfigEntry>>> getTopicsConfig(Collection<String> 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
Expand All @@ -270,8 +272,6 @@ private Mono<Map<String, List<ConfigEntry>>> getTopicsConfigImpl(Collection<Stri
resources,
new DescribeConfigsOptions().includeSynonyms(true).includeDocumentation(includeDoc)).values(),
UnknownTopicOrPartitionException.class,
// Azure Event Hubs does not support describeConfigs API for topics, so we suppress corresponding error.
// See https://github.com/Azure/azure-event-hubs-for-kafka/issues/61 for details.
UnknownServerException.class,
TopicAuthorizationException.class
).map(config -> config.entrySet().stream()
Expand Down

0 comments on commit f14d983

Please sign in to comment.