RockteMQ-AI commented on issue #10559: URL: https://github.com/apache/rocketmq/issues/10559#issuecomment-4841659511
**Issue Evaluation** Category: `type/enhancement` | Status: **Evaluated** **Feasibility:** Feasible **Scope:** Broker dispatch layer (LiteTopic/LMQ), consumer subscription protocol, common module (new `LitePatternMatcher`) **Compatibility:** Backward-compatible — existing exact-match subscriptions continue to work; pattern matching is opt-in. **Assessment:** This is a well-structured proposal that addresses real limitations in the current LiteTopic wildcard implementation (introduced in PR #10204). The three identified gaps — no consumer-side filtering, full LMQ scan overhead, and flat topic naming — are legitimate pain points for hierarchical event architectures. Key observations: - The `__` separator choice is pragmatic, avoiding conflicts with existing `.` usage in topic names and ConsumeQueue paths. - The NATS-inspired `*` / `**` pattern semantics are well-understood and have proven production viability in other messaging systems. - The two-phase expansion approach (eager at `COMPLETE_ADD`, lazy at dispatch) is a reasonable design that balances freshness with performance. - The `LitePatternMatcher` in `common` with recursive segment matching (no regex) is the right performance-conscious approach. **Potential concerns for discussion:** 1. **Pattern index maintenance** — The trie-based index for fast pattern→topic resolution adds memory overhead per broker. Consider the upper bound when thousands of patterns are active. 2. **Cross-module coordination** — If `rocketmq-clients` also needs pattern expression support (for proxy-mode consumption), the pattern syntax should be formalized as a protocol-level contract, not just a broker-internal format. 3. **Validation edge cases** — Patterns like `**__something` (non-terminal `**`) should be explicitly rejected; the `validate()` method needs clear rules. Overall, this is a solid enhancement with a clear implementation path. Recommend proceeding to spec/PR phase after community discussion on the concerns above. --- *Automated evaluation by RockteMQ-AI* -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
