qianye1001 commented on PR #11165: URL: https://github.com/apache/rocketmq/pull/11165#issuecomment-5673577590
The validation mismatch for V2 retry topics is real. Please keep `+` forbidden in ordinary topic and group names, and add dedicated validation for well-formed V2 retry topics. Adding `+` to the shared `VALID_CHAR_BIT_MAP` introduces ambiguous retry-topic names. For example, both of these newly accepted pairs generate the same topic: ```text group=A, topic=B+C -> %RETRY%A+B+C group=A+B, topic=C -> %RETRY%A+B+C ``` The current `KeyBuilder.parseGroup()` also expects exactly two parts when splitting on `+`. It returns `A+B+C` for the example above, which is neither intended group. Even a traditional retry topic `%RETRY%A+B` for group `A+B` is interpreted as a V2 retry topic and parsed as group `A`. `SendMessageProcessor.handleRetryAndDLQ()` uses this parsed group to look up the subscription configuration and handle retries/DLQ routing, so this has behavioral consequences. I reproduced these results against the current PR head. A scoped fix would recognize `%RETRY%<group>+<topic>` in topic validation, require exactly one `+` separator and non-empty components, and validate the components using the existing character rules and applicable length limits. Ordinary topic validation and group validation should continue rejecting `+`. Please also cover valid V2 retry topics, `+` in ordinary topic/group names, and malformed V2 names with empty components or multiple separators in the regression tests. -- 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]
