Skip to content

Commit

Permalink
Fixed matching + containing topics
Browse files Browse the repository at this point in the history
  • Loading branch information
hylkevds committed Aug 3, 2024
1 parent b8c68c8 commit c28290f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,12 @@ private List<Subscription> recursiveMatch(Topic topicName, INode inode, int dept
// type #, + or exact match
Optional<INode> subInode = cnode.childOf(Token.MULTI);
if (subInode.isPresent()) {
Topic remainingRealTopic = (ROOT.equals(cnode.getToken())) ? topicName : topicName.exceptFullHeadToken();
subscriptions.addAll(recursiveMatch(remainingTopic, subInode.get(), depth + 1));
}
subInode = cnode.childOf(Token.SINGLE);
if (subInode.isPresent()) {
subscriptions.addAll(recursiveMatch(remainingTopic, subInode.get(), depth + 1));
Topic remainingRealTopic = (ROOT.equals(cnode.getToken())) ? topicName : topicName.exceptFullHeadToken();
subscriptions.addAll(recursiveMatch(remainingRealTopic, subInode.get(), depth + 1));
}
if (remainingTopic.isEmpty()) {
subscriptions.addAll(cnode.sharedAndNonSharedSubscriptions());
Expand Down

0 comments on commit c28290f

Please sign in to comment.