Repository navigation
Topic exchanges: limit the number of multi-segment matchers allowed - #17039
Conversation
|
Tick the box to add this pull request to the merge queue (same as
|
b3c5461 to
e84bc2b
Compare
Having multiple `#` segments is usually not necessary and results in higher resource use for no real benefit. MQTTv5 restricts patterns to one such matcher. This PR caps the count at two to accommodate for certain exotic but still realistic use cases. Per discussion with @ansd @dcorbacho.
e84bc2b to
0f390a2
Compare
Topic exchanges: limit the number of multi-segment matchers allowed (backport #17039)
|
This is a breaking change and should have been queued to a major version of RabbitMQ. We have 10 routing keys that use three or more |
|
@splatteredbits that's a security fix, so you are welcome. There is no justification for using three or four multi-segment |
There is no. Multiple There is no limit on how many single segment matchers, |
This PR has two parts.
Restriction of Multi-Segment Matchers
Having multiple
#segments is usually not necessary and resultsin higher resource use for no real benefit.
MQTTv5 restricts patterns to one such matcher.
This PR caps the count at two to accommodate for
certain exotic but still realistic use cases.
Trie Matching Refactoring
This PR also introduces a memoization (caching) in
a trie matching function, further reducing the computational cost of using
up to two multi-segment matchers
#.Other
Per discussion with @ansd @dcorbacho.