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/23 12:31:00 UTC

[GitHub] [rocketmq-spring] panzhi33 commented on a diff in pull request #466: [ISSUE #458]Fixed the problem of cannot consume previous messages in broadcast consumption mode

panzhi33 commented on code in PR #466:
URL: https://github.com/apache/rocketmq-spring/pull/466#discussion_r899922551


##########
rocketmq-spring-boot/src/main/java/org/apache/rocketmq/spring/support/DefaultRocketMQListenerContainer.java:
##########
@@ -639,9 +638,11 @@ private void initRocketMQPushConsumer() throws MQClientException {
         switch (messageModel) {
             case BROADCASTING:
                 consumer.setMessageModel(org.apache.rocketmq.common.protocol.heartbeat.MessageModel.BROADCASTING);
+                consumer.setInstanceName(nameServer);
                 break;
             case CLUSTERING:
                 consumer.setMessageModel(org.apache.rocketmq.common.protocol.heartbeat.MessageModel.CLUSTERING);
+                consumer.setInstanceName(RocketMQUtil.getInstanceName(nameServer));
                 break;

Review Comment:
   I think this can be removed。rocketmq-client  are already supported multiple instances。
   
   https://github.com/apache/rocketmq-spring/issues/268
   It can support the configuration of instanceName. in special cases,if such a problem occurs, it is recommended to configure instanceName to solve it.



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