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 2019/11/22 09:53:46 UTC

[GitHub] [rocketmq] lixinwen commented on issue #1589: bug of retry consume message

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:
users@infra.apache.org


With regards,
Apache Git Services