Jenyow opened a new issue #409:
URL: https://github.com/apache/rocketmq-spring/issues/409
## 版本
2.2.1
## 问题描述
1. 生产者向同一主题:myTopic 的 tag1、tag2 分别发送消息
2. 在消费者应用中分别使用 @RocketMQMessageListener(topic = "myTopic", consumerGroup =
"${spring.application.name}", selectorExpression = "tag1")
、@RocketMQMessageListener(topic = "myTopic", consumerGroup =
"${spring.application.name}", selectorExpression = "tag2") 类注解声明消费服务类
3. 只有 1 个可以消费消息,另外一个永远消费不了消息
## 分析
当 topic 、consumerGroup 相同,selectorExpression 不同,启动时后被初始化的 consumer 能消费信息;如果
consumerGroup 的值不同,则都可以消费信息;
## 疑问
是否在同一应用中使用 @RocketMQMessageListener 声明多个消费服务类时, consumerGroup
的值是否一定要不一样?本来是想表达同一消费者组消费不同标签的消息。如果 consumerGroup
的值要求不一样,那意思就变成了,不同消费者组消费不同的标签了。这是否是一个 bug?
--
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]