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 2020/05/23 03:43:29 UTC

[GitHub] [rocketmq-spring] githubzsy opened a new issue #259: dose version 2.1.0 support spring-boot 2.2.6 or two consumers in one consumerGroup?

githubzsy opened a new issue #259:
URL: https://github.com/apache/rocketmq-spring/issues/259


   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:
   
   - What did you do (The steps to reproduce)?
   
   my spring-boot version is 2.2.6
   dependency : rocketmq-spring-boot-starter
   two consumers in one consumerGroup 
   version 2.0.3 work correctly
   version 2.1.0 exception occurred:
   Caused by: org.apache.rocketmq.client.exception.MQClientException: The consumer group[my-consumer_test-topic_1] has been created before, specify another name please.
   
   java code:
   ```java
   package com.example.mq.rocketmq;
   
   public class RocketConstants {
   
       public static final String TEST_TOPIC = "test-topic";
   
       public static final String CONSUMER_GROUP1 = "my-consumer_test-topic_1";
   }
   ```
   ```java
   package com.example.mq.rocketmq;
   
   import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
   import org.apache.rocketmq.spring.core.RocketMQListener;
   import org.springframework.stereotype.Service;
   
   /**
    * consumerGroup=消费者组的名称
    */
   @Service
   @RocketMQMessageListener(consumerGroup = RocketConstants.CONSUMER_GROUP1, topic = RocketConstants.TEST_TOPIC)
   public class RocketConsumer implements RocketMQListener<String> {
   
       @Override
       public void onMessage(String message) {
           System.err.println("RocketConsumer接收到消息:" + message);
       }
   }
   ```
   ```java
   package com.example.mq.rocketmq;
   
   import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
   import org.apache.rocketmq.spring.core.RocketMQListener;
   import org.springframework.stereotype.Service;
   
   /**
    * consumerGroup=消费者组的名称
    */
   @Service
   @RocketMQMessageListener(consumerGroup = RocketConstants.CONSUMER_GROUP1, topic = RocketConstants.TEST_TOPIC)
   public class RocketConsumer2 implements RocketMQListener<String> {
   
       @Override
       public void onMessage(String message) {
           System.err.println("RocketConsumer2接收到消息:" + message);
       }
   }
   ```
   
   - What did you expect to see?
      Is it the compatibility problem or the way I used it wrong?
   
   - What did you see instead?
   
   2. Please tell us about your environment:
   
   3. Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):
   
   **FEATURE REQUEST**
   
   1. Please describe the feature you are requesting.
   
   2. Provide any additional detail on your proposed use case for this feature.
   
   3. Indicate the importance of this issue to you (blocker, must-have, should-have, nice-to-have). Are you currently using any workarounds to address this issue?
   


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq-spring] RongtongJin commented on issue #259: Does version 2.1.0 support spring-boot 2.2.6 or two consumers in one consumerGroup?

Posted by GitBox <gi...@apache.org>.
RongtongJin commented on issue #259:
URL: https://github.com/apache/rocketmq-spring/issues/259#issuecomment-633420441


   Hi @githubzsy , plz refer to Article 3 of the [wiki FAQ](https://github.com/apache/rocketmq-spring/wiki/%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98). if you must do it, you can set different instance name for consumer in prepareStart method.


----------------------------------------------------------------
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.

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



[GitHub] [rocketmq-spring] githubzsy commented on issue #259: Does version 2.1.0 support spring-boot 2.2.6 or two consumers in one consumerGroup?

Posted by GitBox <gi...@apache.org>.
githubzsy commented on issue #259:
URL: https://github.com/apache/rocketmq-spring/issues/259#issuecomment-633436634


   @RongtongJin  谢谢,设置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.

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



[GitHub] [rocketmq-spring] githubzsy closed issue #259: Does version 2.1.0 support spring-boot 2.2.6 or two consumers in one consumerGroup?

Posted by GitBox <gi...@apache.org>.
githubzsy closed issue #259:
URL: https://github.com/apache/rocketmq-spring/issues/259


   


----------------------------------------------------------------
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.

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