lixinwen commented on issue #1589: bug of retry consume message
URL: https://github.com/apache/rocketmq/issues/1589#issuecomment-557467562
 
 
   > @lixinwen the same group name, the same instanceName in the same machine 
will cause the consumer load balancing to not work properly, which will lead to 
a large amount of repeated consumption, so there will be so many messages sent 
back to the retry topic.
   > Since the server is difficult to perform repeated detections at a 
relatively low cost, so it is recommended to follow the best practices. If you 
have good suggestions, please leave a message or submit a PR.
   > I will turn off this issue first, but if you have any other questions 
about this issue, please feel free to reopen it.
   
   I still recommend that rocketmq itself avoid this problem. 
   In our production environment, there was an accident.
   In the docker environment, two tomcat processes are started without their 
knowledge.
   
   Can be modified as follows, the internal version of our company is treated 
like this.
   ConsumerGroupInfo#updateChannel
   synchronized (registerLock) {
        ......
        ClientChannelInfo infoOld = 
this.channelInfoTable.get(infoNew.getChannel());
        if (null == infoOld) {
                for (ClientChannelInfo channelInfo : channelInfoTable.values()) 
{
                        if (clientId.equals(channelInfo.getClientId())) {
                                if (channel != channelInfo.getChannel()) {
                                        log.error("channel[{}] found duplicated 
clientId[{}], exists consumer: {}", channel, clientId,
                                                        channelInfo);
                                        // Catch the exception in 
ClientManageProcessor#headBeat() and close the channel, or close it directly 
here.
                                        throw new 
ClientRegisterException("Duplicated clientId " + clientId);
                                }
                        }
                }
        }
        ......
   }

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to