MatrixHB opened a new issue #3890:
URL: https://github.com/apache/rocketmq/issues/3890


   The command `ConsumerConnectionSubCommand`  is used to query the connection 
of consumer and brokers, and it randomly selects one of all brokers to view the 
consumers who maintain the heartbeat with this broker. 
   ```
           String topic = MixAll.getRetryTopic(consumerGroup);
           List<BrokerData> brokers = 
this.examineTopicRouteInfo(topic).getBrokerDatas();
   // randomly select
           BrokerData brokerData = brokers.get(random.nextInt(brokers.size()));
           String addr = null;
           if (brokerData != null) {
               addr = brokerData.selectBrokerAddr();
               if (StringUtils.isNotBlank(addr)) {
                   result = 
this.mqClientInstance.getMQClientAPIImpl().getConsumerConnectionList(addr, 
consumerGroup, timeoutMillis);
               }
           }
   ```
   When one broker encounter network problem or FGC, the `consumertable` 
maintained locally by the broker does not conform to the reality. When this 
broker is randomly selected, it is determined that the consumer is "offline".
   
   
   
   In order to more easily locate the broker with problems when facing such 
problems, the ConsumerConnection command needs to have a more specific '-b' 
parameter (not available at present).


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to