Skip to content

Commit

Permalink
fix issue 248
Browse files Browse the repository at this point in the history
  • Loading branch information
ForeverSRC committed Jan 27, 2024
1 parent a303965 commit e9109f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ protected boolean match(BindConfiguration bindConfiguration, String routingKey,
String bindingRegex = bindConfiguration.bindingKey
.replace("*", "([^\\.]+)")
.replace(".#", "(\\.(.*))?")
.replace("#", "(.+)");
.replace("#", "(.*)");
return routingKey.matches(bindingRegex);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ class TopicTest {
"lazy.#, lazy.pink",
"lazy.#, lazy.pink.rabbit",
"some.#.key.*, some.stuff.key.1",
"#, ''",
"#, some-key",
"#, some.stuff.key.1",
})
void binding_key_matches_routing_key(String bindingKey, String routingKey) {
MultipleReceiverExchange topicExchange = (MultipleReceiverExchange) mockExchangeFactory.build("test", BuiltinExchangeType.TOPIC.getType(), empty(), mock(ReceiverRegistry.class));
Expand Down

0 comments on commit e9109f8

Please sign in to comment.