Skip to content

Commit

Permalink
[ISSUE #6627] Fix ConsumerLagCalculator#processAllGroup retry topic N…
Browse files Browse the repository at this point in the history
…PE (#6628)
  • Loading branch information
drpmma committed Apr 21, 2023
1 parent ea8b9d9 commit af6a95f
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,14 @@ private void processAllGroup(Consumer<ProcessGroupInfo> consumer) {
if (isPop) {
String retryTopic = KeyBuilder.buildPopRetryTopic(topic, group);
TopicConfig retryTopicConfig = topicConfigManager.selectTopicConfig(retryTopic);
int retryTopicPerm = retryTopicConfig.getPerm() & brokerConfig.getBrokerPermission();
if (PermName.isReadable(retryTopicPerm) || PermName.isWriteable(retryTopicPerm)) {
consumer.accept(new ProcessGroupInfo(group, topic, true, retryTopic));
} else {
consumer.accept(new ProcessGroupInfo(group, topic, true, null));
if (retryTopicConfig != null) {
int retryTopicPerm = retryTopicConfig.getPerm() & brokerConfig.getBrokerPermission();
if (PermName.isReadable(retryTopicPerm) || PermName.isWriteable(retryTopicPerm)) {
consumer.accept(new ProcessGroupInfo(group, topic, true, retryTopic));
continue;
}
}
consumer.accept(new ProcessGroupInfo(group, topic, true, null));
} else {
consumer.accept(new ProcessGroupInfo(group, topic, false, null));
}
Expand Down

0 comments on commit af6a95f

Please sign in to comment.