private boolean getStoredGroupHisOffsets(String groupName, Set<String> topicSet,
            MessageStore msgStore, long requestOffset, int maxRetryCnt,
            long recStartTime, long recEndTime, ProcessResult result) {
        int msgTypeCode;
        int partitionId;
        Throwable qryThrow;
        GetMessageResult getMessageResult;
        // locate partitionId and filter-item
        msgTypeCode = groupName.hashCode();
        partitionId = Math.abs(msgTypeCode) % TServerConstants.OFFSET_HISTORY_NUMPARTS;
        Set<String> filterCodes = new HashSet<>();
        filterCodes.add(groupName);
        // build consumer node information
        ConsumerNodeInfo consumerNodeInfo = new ConsumerNodeInfo(broker.getStoreManager(),
                groupName, "offsetConsumer", filterCodes, "", System.currentTimeMillis(), "", "");
        // query records from storage
        int qryRetryCount = 0;
        long itemInitOffset = requestOffset;
        int maxTransferSize = broker.getStoreManager().getMaxMsgTransferSize();
        do {
            qryThrow = null;
            try {
                getMessageResult = msgStore.getMessages(303, itemInitOffset,
                        partitionId, consumerNodeInfo, TServerConstants.OFFSET_HISTORY_NAME,
                        maxTransferSize, recStartTime);
            } catch (Throwable e2) {
                qryThrow = e2;
                continue;
            }
            // check query result
            if (getMessageResult.transferedMessageList == null
                    || getMessageResult.transferedMessageList.isEmpty()) {
                itemInitOffset += getMessageResult.lastReadOffset;
                continue;
            }
            // build record to return result
            List<Message> messageList = DataConverterUtil.convertMessage(
                    TServerConstants.OFFSET_HISTORY_NAME, getMessageResult.transferedMessageList);
            for (Message message : messageList) {
                if (message == null) {
                    continue;
                }
                long recAppTime = DateTimeConvertUtils.yyyyMMddHHmm2ms(
                        message.getAttrValue(TokenConstants.TOKEN_MSG_TIME));
                if (recAppTime > recEndTime) {
                    result.setFailResult(String.format(
                            "Over required endTime range, current time is %s",
                            message.getAttrValue(TokenConstants.TOKEN_MSG_TIME)));
                    return result.isSuccess();
                }
                if (!groupName.equals(message.getAttrValue(
                        TServerConstants.TOKEN_OFFSET_GROUP))) {
                    continue;
                }
                return OffsetHistoryInfo.parseRecordInfo(topicSet,
                        StringUtils.newStringUtf8(message.getData()), result);
            }
            itemInitOffset += getMessageResult.lastReadOffset;
        } while (++qryRetryCount < maxRetryCnt);
        // check query result
        if (qryThrow == null) {
            result.setFailResult("Not found record in required search range");
        } else {
            result.setFailResult(String.format(
                    "Query record failure, reason is :%s", qryThrow.getMessage()));
        }
        return result.isSuccess();
    }
Query group's offset records stored in broker.

@param groupName      group name
@param topicSet       the topic set need query
@param msgStore       history offset store
@param requestOffset  request offset
@param maxRetryCnt    max query turns
@param recStartTime   record start timestamp
@param recEndTime     record end timestamp
@param result         query result
@return  whether success
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/web/BrokerAdminServlet.java