public void adminQueryConsumerRegisterInfo(HttpServletRequest req,
            StringBuilder strBuff) {
        ProcessResult result = new ProcessResult();
        if (!WebParameterUtils.getStringParamValue(req,
                WebFieldDef.COMPSGROUPNAME, false, null, strBuff, result)) {
            WebParameterUtils.buildFailResult(strBuff, result.getErrMsg());
            return;
        }
        Set<String> groupNameSet = (Set<String>) result.getRetData();
        // get online partition-client map
        int totalCnt = 0;
        Map<String, ConsumerNodeInfo> map =
                broker.getBrokerServiceServer().getConsumerRegisterMap();
        strBuff.append("{\"result\":true,\"errCode\":0,\"errMsg\":\"Success!\",\"dataSet\":[");
        for (Entry<String, ConsumerNodeInfo> entry : map.entrySet()) {
            if (entry.getKey() == null || entry.getValue() == null) {
                continue;
            }
            if (!groupNameSet.isEmpty()
                    && !groupNameSet.contains(entry.getValue().getGroupName())) {
                continue;
            }
            if (totalCnt++ > 0) {
                strBuff.append(",");
            }
            strBuff.append("{\"Partition\":\"").append(entry.getKey())
                    .append("\",\"Consumer\":\"")
                    .append(entry.getValue().getConsumerId())
                    .append("\",\"index\":").append(totalCnt).append("}");
        }
        strBuff.append("],\"totalCnt\":").append(totalCnt).append("}");
    }
Query the consumed partition information of online consumer.

@param req      request
@param strBuff  process result
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/web/BrokerAdminServlet.java