You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "SuperEdison (via GitHub)" <gi...@apache.org> on 2024/03/04 07:37:46 UTC
[I] 一个项目不能使用相同的consumerGroup [rocketmq-spring]
SuperEdison opened a new issue, #641:
URL: https://github.com/apache/rocketmq-spring/issues/641
The issue tracker is **ONLY** used for bug report and feature request.
Any question or RocketMQ proposal please use our [mailing lists](http://rocketmq.apache.org/about/contact/).
**BUG REPORT**
1. Please describe the issue you observed:

官方文档上面说的是两个订阅相互独立,但是现在接收不到消息
```java
@Service
@RocketMQMessageListener(consumerGroup = "boot_group_1",topic = "boot-mq-topic1")
public class ConsumerListener implements RocketMQListener<String> {
private static final Logger log = LoggerFactory.getLogger(ConsumerListener.class);
@Override
public void onMessage(String message) {
log.info("boot-mq-topic1 \n=====\n message:{} \n=====\n",message);
}
}
```
```java
@Service
@RocketMQMessageListener(consumerGroup = "boot_group_1",topic = "boot-mq-topic2")
public class ConsumerListener1 implements RocketMQListener<String> {
private static final Logger log = LoggerFactory.getLogger(ConsumerListener1.class);
@Override
public void onMessage(String message) {
log.info("boot-mq-topic2 \n=====\n message:{} \n=====\n",message);
}
}
```
```java
@GetMapping("/send/msg1")
public String sendMsg1 (){
try {
JsonMapper jsonMapper = new JsonMapper();
String msgBody = jsonMapper.writeValueAsString(new MqMsg(1,"boot_mq_msg"));
String msgBody1 = jsonMapper.writeValueAsString(new MqMsg(2,"boot_mq_msg"));
SendResult sendResult1 = rocketMqTemplate.syncSend("boot-mq-topic1", msgBody);
SendResult sendResult2 = rocketMqTemplate.syncSend("boot-mq-topic2", msgBody1);
System.out.println(sendResult1.getSendStatus());
System.out.println(sendResult2.getSendStatus());
} catch (Exception e) {
e.printStackTrace();
}
return "OK" ;
}
```
2. Please tell us about your environment:
走的是官方文档的部署过程版本5.1.4
3. Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):
--
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: commits-unsubscribe@rocketmq.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] A project cannot use the same consumer group [rocketmq-spring]
Posted by "SuperEdison (via GitHub)" <gi...@apache.org>.
SuperEdison commented on issue #641:
URL: https://github.com/apache/rocketmq-spring/issues/641#issuecomment-1993761761
rocketmq-spring version 2.3.0
rocketmq version 5.1.4
> @SuperEdison 用的是什么版本?可以设置不同的instanceName来解决
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] A project cannot use the same consumer group [rocketmq-spring]
Posted by "SuperEdison (via GitHub)" <gi...@apache.org>.
SuperEdison closed issue #641: A project cannot use the same consumer group
URL: https://github.com/apache/rocketmq-spring/issues/641
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] 一个项目不能使用相同的consumerGroup [rocketmq-spring]
Posted by "panzhi33 (via GitHub)" <gi...@apache.org>.
panzhi33 commented on issue #641:
URL: https://github.com/apache/rocketmq-spring/issues/641#issuecomment-1987676326
springboot不支持这种方式,这样使用应该订阅关系不一致了,需要使用不同的group
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] A project cannot use the same consumer group [rocketmq-spring]
Posted by "RongtongJin (via GitHub)" <gi...@apache.org>.
RongtongJin commented on issue #641:
URL: https://github.com/apache/rocketmq-spring/issues/641#issuecomment-1993752691
@SuperEdison 用的是什么版本?可以设置不同的instanceName来解决
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org