jokerzsd commented on PR #11165: URL: https://github.com/apache/rocketmq/pull/11165#issuecomment-5674056359
Thanks for the detailed review, @qianye1001. Agreed — allowing `+` in the shared `VALID_CHAR_BIT_MAP` created the ambiguity you described. I've reworked the fix: - `+` remains **forbidden** in ordinary topic and group names (reverted the bit-map change and error-message regexes). - `validateTopic` now short-circuits to a dedicated `validatePopRetryTopicV2` for `%RETRY%<group>+<topic>`: it requires exactly one `+`, non-empty `group`/`topic`, validates each component against the existing character rules (which still reject `+`), and enforces the 255 retry-topic length limit. Regression tests now cover: a valid V2 retry topic, `+` in ordinary topic names, `+` in group names, and malformed V2 names (multiple separators, empty group, empty topic). `mvn -f common/pom.xml test -Dtest=TopicValidatorTest` → 13/13 pass. -- 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]
