You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/07/22 09:36:08 UTC

[GitHub] [rocketmq] gongchangyou commented on issue #4656: MQClientInstance 中为什么 consumerTable 的key设置成 group ,而不是topic + group ?

gongchangyou commented on issue #4656:
URL: https://github.com/apache/rocketmq/issues/4656#issuecomment-1192380088

   > > 想咨询一下 设计的想法,为什么 MQClientInstance 中的consumerTable 的key是group, 而不是 topic+group. 这样就能区分 不同的topic + 相同的group了,对应的是两个不同的consumer。
   > 
   > @gongchangyou 事实上,一个消费组的所有实例应该订阅相同的Topic,如果不同实例订阅的Topic不相同,服务端保存的订阅关系会被频繁修改,会导致消费混乱,甚至消息丢失。正确的方法应该是使用不同的消费组去订阅不同的Topic。可以参考下[https://help.aliyun.com/document_detail/43523.html。](https://help.aliyun.com/document_detail/43523.html%E3%80%82)
   > 
   > In fact, all instances of a consumer group should subscribe to the same topic. If the topics subscribed to by different instances are not the same, the subscription relationship saved by the server will be frequently modified, which will lead to confusion in consumption and even message loss. The correct method should be to use different consumer groups to subscribe to different topics. You can refer to https://help.aliyun.com/document_detail/43523.html.
   
   感谢您的回复,我已经拜读了 订阅关系一致 原则。其实我的问题很简单。就是如果 规定 topic +group 相同 才算是**真正的**同一组。这样设计是否简单些?这样的话 不同的topic ,相同groupname 的consumer就会被认为是不同组的consumer。自然就不会消费混乱了。


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org