Skip to content

Commit

Permalink
fix(topicdata): handle unsupported DescribeLogDirs for MSK Serverless (
Browse files Browse the repository at this point in the history
  • Loading branch information
moremagic committed Jun 6, 2022
1 parent dbef78e commit 09ca266
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/akhq/modules/AbstractKafkaWrapper.java
Expand Up @@ -16,6 +16,7 @@
import org.apache.kafka.common.errors.ClusterAuthorizationException;
import org.apache.kafka.common.errors.SecurityDisabledException;
import org.apache.kafka.common.errors.TopicAuthorizationException;
import org.apache.kafka.common.errors.UnsupportedVersionException;

import java.util.*;
import java.util.concurrent.ExecutionException;
Expand Down Expand Up @@ -254,7 +255,7 @@ public Map<Integer, Map<String, LogDirDescription>> describeLogDir(String cluste
.allDescriptions()
.get();
} catch (ExecutionException e) {
if (e.getCause() instanceof ClusterAuthorizationException || e.getCause() instanceof TopicAuthorizationException) {
if (e.getCause() instanceof ClusterAuthorizationException || e.getCause() instanceof TopicAuthorizationException || e.getCause() instanceof UnsupportedVersionException) {
return new HashMap<>();
}

Expand Down

0 comments on commit 09ca266

Please sign in to comment.