GitHub user Gonzo-Tan added a comment to the discussion: the expected type is 
FIFO, but actual type is NORMAL BROKER

这个应该是 bug,看了下代码,这个终端的查询逻辑如下:
``` java

// 获取 group 信息
 ConsumerGroupInfo consumerGroupInfo =
            
this.brokerController.getConsumerManager().getConsumerGroupInfo(requestHeader.getConsumerGroup(),
 false);
        if (consumerGroupInfo != null) {
            // ....  省略构建参数

            // 获取 channel 信息,构建城客户端信息
            Iterator<Map.Entry<Channel, ClientChannelInfo>> it = 
consumerGroupInfo.getChannelInfoTable().entrySet().iterator();
            while (it.hasNext()) {
                ClientChannelInfo info = it.next().getValue();
                Connection connection = new Connection();
                connection.setClientId(info.getClientId());
                connection.setLanguage(info.getLanguage());
                connection.setVersion(info.getVersion());
                
connection.setClientAddr(RemotingHelper.parseChannelRemoteAddr(info.getChannel()));

                bodydata.getConnectionSet().add(connection);
            }
}

public ConsumerGroupInfo getConsumerGroupInfo(String group, boolean 
fromCompensationTable) {
        // consumerTable 里面没有 group 信息
        ConsumerGroupInfo consumerGroupInfo = consumerTable.get(group);
        // fromCompensationTable 传的 false 所以也不会从补偿表里面获取
        if (consumerGroupInfo == null && fromCompensationTable) {
            consumerGroupInfo = consumerCompensationTable.get(group);
        }
        return consumerGroupInfo;
    }
```

主要原因是如果 client 是和 proxy 建连的话,订阅信息是在拉取消息的时候做补偿设置的,所以这部分数据存放在 
`consumerCompensationTable` 里面。老的 remoting 逻辑是 client 直接往 broker 发心跳,订阅信息存放在 
consumerTable 里面。
这块不知道官方后续是怎么维护,目前没看到有啥可以跳过的方式。




GitHub link: 
https://github.com/apache/rocketmq-clients/discussions/785#discussioncomment-9964691

----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscr...@rocketmq.apache.org

Reply via email to