public void adminQueryGroupHistoryOffSet(HttpServletRequest req,
            StringBuilder sBuffer) {
        ProcessResult result = new ProcessResult();
        // get group list
        if (!WebParameterUtils.getStringParamValue(req,
                WebFieldDef.COMPSGROUPNAME, true, null, sBuffer, result)) {
            WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());
            return;
        }
        final Set<String> groupNameSet = (Set<String>) result.getRetData();
        // get the maximum record number of the group to be queried
        if (!WebParameterUtils.getIntParamValue(req,
                WebFieldDef.MSGCOUNT, false, 1, 1, sBuffer, result)) {
            WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());
            return;
        }
        final int msgCount = (Integer) result.getRetData();
        // get the maximum query turns
        if (!WebParameterUtils.getIntParamValue(req,
                WebFieldDef.MAXRETRYCOUNT, false,
                2, 1, 30, sBuffer, result)) {
            WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());
            return;
        }
        final int maxRetryCnt = (Integer) result.getRetData();
        // get the timestamp to be queried
        if (!WebParameterUtils.getDateParameter(req,
                WebFieldDef.RECORDTIME, true, null, sBuffer, result)) {
            WebParameterUtils.buildFailResult(sBuffer, result.getErrMsg());
            return;
        }
        final Date recordTime = (Date) result.getRetData();
        final long recordStamp = recordTime.getTime();
        // check storage status
        if (ServiceStatusHolder.isReadServiceStop()) {
            WebParameterUtils.buildFailResult(sBuffer,
                    "Read StoreService temporary unavailable!");
            return;
        }
        // get offset history storage
        MessageStore msgStore;
        MessageStoreManager storeManager = broker.getStoreManager();
        try {
            msgStore = storeManager.getOrCreateMessageStore(
                    TServerConstants.OFFSET_HISTORY_NAME, 0);
        } catch (Throwable ex) {
            sBuffer.append("{\"result\":false,\"errCode\":400,\"errMsg\":\"")
                    .append("Invalid parameter: not found the store by topicName(")
                    .append(TServerConstants.OFFSET_HISTORY_NAME).append("), reason is ")
                    .append(ex.getMessage()).append("\"}");
            return;
        }
        // read history data
        int totalCnt = 0;
        // locate start offset
        long requestOffset = msgStore.getStartOffsetByTimeStamp(recordStamp);
        WebParameterUtils.buildSuccessWithDataRetBegin(sBuffer);
        for (String groupName : groupNameSet) {
            if (totalCnt++ > 0) {
                sBuffer.append(",");
            }
            queryGroupStoredOffsets(msgStore, groupName, requestOffset,
                    recordStamp, msgCount, maxRetryCnt, sBuffer);
        }
        WebParameterUtils.buildSuccessWithDataRetEnd(sBuffer, totalCnt);
    }
Query consumer group history offset by timestamp.

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