KingCide opened a new pull request, #9637: URL: https://github.com/apache/rocketmq/pull/9637
<!-- Please make sure the target branch is right. In most case, the target branch should be `develop`. --> ### Which Issue(s) This PR Fixes https://github.com/apache/rocketmq/issues/9632 <!-- Please ensure that the related issue has already been created, and [link this pull request to that issue using keywords](<https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword>) to ensure automatic closure. --> Fixes #9632 ### Brief Description 1. topicCidMap是PopLongPollingService的一个核心数据结构,存储Topic下的消费者组映射,由两层map构成,内层map存储的key就是消费者组ID (ConsumerGroup/CID),在polling方法中被赋值。 2. 借助这个数据结构,我设计了反向查找机制,避免了字符串解析的歧义问题 a. 通过遍历topicCidMap中的所有topic-consumerGroup组合 b. 对每个组合重建V1重试Topic名称,与输入的重试Topic进行匹配 3. 当发现多个原始Topic都能生成相同的重试Topic时,标记为hasDuplicatedTopic a. 在有歧义的情况下,返回原始的重试Topic名称,避免错误的消息路由,不会因为Topic命名冲突导致消息通知错误(虽然如果有冲突,错误一定会发生的,但不会因为这段代码的修改引起) <!-- Write a brief description for your pull request to help the maintainer understand the reasons behind your changes. --> ### How Did You Test This Change? <!-- In order to ensure the code quality of Apache RocketMQ, we expect every pull request to have undergone thorough testing. --> -- 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]
