Skip to content

Commit

Permalink
optimize topic pattern subscriber
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaochen-zhou committed Sep 4, 2024
1 parent dec4812 commit e2b706f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static Map<String, TopicDescription> getTopicMetadata(AdminClient adminClient, P
try {
Set<String> allTopicNames = adminClient.listTopics().names().get();
Set<String> patternTopicNames = allTopicNames.stream()
.filter(topicName -> topicPattern.matcher(topicName).matches())
.filter(name -> topicPattern.matcher(name).matches())
.collect(Collectors.toSet());
return getTopicMetadata(adminClient, patternTopicNames);
} catch (Exception e) {
Expand Down

0 comments on commit e2b706f

Please sign in to comment.