public Map<Integer, List<FlowCtrlItem>> parseFlowCtrlInfo(final String flowCtrlInfo)
            throws Exception {
        Map<Integer, List<FlowCtrlItem>> flowCtrlMap = new ConcurrentHashMap<>();
        if (TStringUtils.isBlank(flowCtrlInfo)) {
            throw new Exception("Parsing error, flowCtrlInfo value is blank!");
        }
        JsonArray objArray = null;
        try {
            objArray = JsonParser.parseString(flowCtrlInfo).getAsJsonArray();
        } catch (Throwable e1) {
            throw new Exception("Parse flowCtrlInfo value failure", e1);
        }
        if (objArray == null) {
            throw new Exception("Parsing error, flowCtrlInfo value must be valid json format!");
        }
        if (objArray.size() == 0) {
            return flowCtrlMap;
        }
        try {
            int recordNo;
            List<FlowCtrlItem> flowCtrlItemList;
            for (int i = 0; i < objArray.size(); i++) {
                JsonElement jsonItem = objArray.get(i);
                if (jsonItem == null) {
                    continue;
                }
                recordNo = i + 1;
                JsonObject jsonObject = jsonItem.getAsJsonObject();
                if (!jsonObject.has("type")) {
                    throw new Exception(new StringBuilder(512)
                            .append("FIELD type is required in record(")
                            .append(recordNo).append(") of flowCtrlInfo value!").toString());
                }
                int typeVal = jsonObject.get("type").getAsInt();
                if (typeVal < 0 || typeVal > 3) {
                    throw new Exception(new StringBuilder(512)
                            .append("the value of FIELD type must in [0,1,3] in record(")
                            .append(recordNo).append(") of flowCtrlInfo value!").toString());
                }
                switch (typeVal) {
                    case 1:
                        flowCtrlItemList = parseFreqLimit(recordNo, typeVal, jsonObject);
                        break;

                    case 2: /* Deprecated */
                        flowCtrlItemList = null;
                        break;

                    case 3:
                        flowCtrlItemList = parseLowFetchLimit(recordNo, typeVal, jsonObject);
                        break;

                    case 0:
                    default:
                        typeVal = 0;
                        flowCtrlItemList = parseDataLimit(recordNo, typeVal, jsonObject);
                        break;
                }
                if (flowCtrlItemList != null && !flowCtrlItemList.isEmpty()) {
                    flowCtrlMap.put(typeVal, flowCtrlItemList);
                }
            }
        } catch (Throwable e2) {
            throw new Exception(new StringBuilder(512)
                    .append("Parse flowCtrlInfo value failure, ")
                    .append(e2.getMessage()).toString());
        }
        return flowCtrlMap;
    }
Parse FlowCtrlInfo value

@param flowCtrlInfo    flowCtrlInfo json value
@return                parse result
@throws Exception      Exception thrown
inlong-tubemq/tubemq-core/src/main/java/org/apache/inlong/tubemq/corebase/policies/FlowCtrlRuleHandler.java