public static boolean parseRecordInfo(Set<String> topicSet,
            String jsonData,
            ProcessResult result) {
        JsonObject jsonObject = null;
        try {
            jsonObject = JsonParser.parseString(jsonData).getAsJsonObject();
        } catch (Throwable e1) {
            result.setFailResult(String.format(
                    "Parse history offset value failure, reason is %s", e1.getMessage()));
            return result.isSuccess();
        }
        if (jsonObject == null) {
            result.setFailResult("Parse error, history offset value must be valid json format!");
            return result.isSuccess();
        }
        if (!isFieldExist(jsonObject, "ver", result)
                || !isFieldExist(jsonObject, "dt", result)
                || !isFieldExist(jsonObject, "offsets", result)) {
            return result.isSuccess();
        }
        int verValue = jsonObject.get("ver").getAsInt();
        if (verValue != TBaseConstants.OFFSET_HISTORY_RECORD_SHORT_VERSION
                && verValue != TBaseConstants.OFFSET_HISTORY_RECORD_VERSION_3) {
            result.setFailResult("Only support v2 or v3 version in history offset value!");
            return result.isSuccess();
        }
        long dtValue = jsonObject.get("dt").getAsLong();
        boolean found = false;
        List<Tuple4<Long, String, Integer, Long>> resetOffsets = new ArrayList<>();
        JsonArray records = jsonObject.get("offsets").getAsJsonArray();
        for (int i = 0; i < records.size(); i++) {
            JsonObject itemInfo = records.get(i).getAsJsonObject();
            if (itemInfo == null) {
                continue;
            }
            String topicName = itemInfo.get("topic").getAsString();
            if (topicSet != null && !topicSet.isEmpty() && !topicSet.contains(topicName)) {
                continue;
            }
            found = true;
            JsonArray offsets = itemInfo.get("offsets").getAsJsonArray();
            for (int j = 0; j < offsets.size(); j++) {
                JsonObject storeInfo = offsets.get(j).getAsJsonObject();
                if (storeInfo == null) {
                    continue;
                }
                JsonArray partInfos = storeInfo.get("parts").getAsJsonArray();
                for (int k = 0; k < partInfos.size(); k++) {
                    JsonObject partItem = partInfos.get(k).getAsJsonObject();
                    int partId = partItem.get("partId").getAsInt();
                    long offsetVal = partItem.get("iCfm").getAsLong();
                    resetOffsets.add(new Tuple4<>(dtValue, topicName, partId, offsetVal));
                }
            }
        }
        if (found) {
            result.setSuccResult(resetOffsets);
        } else {
            result.setFailResult(String.format(
                    "Not found required topics %s in history offset value!", topicSet));
        }
        return result.isSuccess();
    }
Parse history offset record info

@param topicSet  the filtered topic set
@param jsonData  string offset information
@param result    process result
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/offset/OffsetHistoryInfo.java