private boolean getBrokerJsonSetInfo(HttpServletRequest req, boolean isAddOp,
            BaseEntity defOpEntity, StringBuilder sBuffer,
            ProcessResult result) {
        if (!WebParameterUtils.getJsonArrayParamValue(req,
                WebFieldDef.BROKERJSONSET, true, null, result)) {
            return result.isSuccess();
        }
        List<Map<String, String>> brokerJsonArray =
                (List<Map<String, String>>) result.getRetData();
        // check and get cluster default setting info
        ClusterSettingEntity defClusterSetting =
                defMetaDataService.getClusterDefSetting(false);
        // check and get broker configure
        BrokerConfEntity itemEntity;
        HashMap<Integer, BrokerConfEntity> addedRecordMap = new HashMap<>();
        for (Map<String, String> brokerObject : brokerJsonArray) {
            // check and get operation info
            if (!WebParameterUtils.getAUDBaseInfo(brokerObject,
                    isAddOp, defOpEntity, sBuffer, result)) {
                return result.isSuccess();
            }
            BaseEntity itemOpEntity = (BaseEntity) result.getRetData();
            // get brokerPort field
            if (!WebParameterUtils.getIntParamValue(brokerObject, WebFieldDef.BROKERPORT,
                    false, (isAddOp ? defClusterSetting.getBrokerPort()
                            : TBaseConstants.META_VALUE_UNDEFINED),
                    1, sBuffer, result)) {
                return result.isSuccess();
            }
            int brokerPort = (int) result.getRetData();
            // get brokerTlsPort field
            if (!WebParameterUtils.getIntParamValue(brokerObject, WebFieldDef.BROKERTLSPORT,
                    false, (isAddOp ? defClusterSetting.getBrokerTLSPort()
                            : TBaseConstants.META_VALUE_UNDEFINED),
                    1, sBuffer, result)) {
                return result.isSuccess();
            }
            int brokerTlsPort = (int) result.getRetData();
            // get brokerWebPort field
            if (!WebParameterUtils.getIntParamValue(brokerObject, WebFieldDef.BROKERWEBPORT,
                    false, (isAddOp ? defClusterSetting.getBrokerWebPort()
                            : TBaseConstants.META_VALUE_UNDEFINED),
                    1, sBuffer, result)) {
                return result.isSuccess();
            }
            int brokerWebPort = (int) result.getRetData();
            // get regionId field
            if (!WebParameterUtils.getIntParamValue(brokerObject, WebFieldDef.REGIONID,
                    false, (isAddOp ? TServerConstants.BROKER_REGION_ID_DEF
                            : TBaseConstants.META_VALUE_UNDEFINED),
                    TServerConstants.BROKER_REGION_ID_MIN, sBuffer, result)) {
                return result.isSuccess();
            }
            int regionId = (int) result.getRetData();
            // get groupId field
            if (!WebParameterUtils.getIntParamValue(brokerObject, WebFieldDef.GROUPID,
                    false, (isAddOp ? TServerConstants.BROKER_GROUP_ID_DEF
                            : TBaseConstants.META_VALUE_UNDEFINED),
                    TServerConstants.BROKER_GROUP_ID_MIN, sBuffer, result)) {
                return result.isSuccess();
            }
            int groupId = (int) result.getRetData();
            // get and valid TopicPropGroup info
            if (!WebParameterUtils.getTopicPropInfo(brokerObject,
                    (isAddOp ? defClusterSetting.getClsDefTopicProps() : null), sBuffer, result)) {
                return result.isSuccess();
            }
            TopicPropGroup brokerProps = (TopicPropGroup) result.getRetData();
            // get and valid broker manage status info
            if (!getManageStatusParamValue(brokerObject, sBuffer, result)) {
                return result.isSuccess();
            }
            ManageStatus mngStatus = (ManageStatus) result.getRetData();
            if (isAddOp) {
                // get brokerIp and brokerId field
                if (!getBrokerIpAndIdParamValue(brokerObject, sBuffer, result)) {
                    return result.isSuccess();
                }
                Tuple2<Integer, String> brokerIdAndIpTuple =
                        (Tuple2<Integer, String>) result.getRetData();
                // set the initial status
                if (mngStatus == ManageStatus.STATUS_MANAGE_UNDEFINED) {
                    mngStatus = ManageStatus.STATUS_MANAGE_APPLY;
                }
                // buid new record
                itemEntity = new BrokerConfEntity(itemOpEntity,
                        brokerIdAndIpTuple.getF0(), brokerIdAndIpTuple.getF1());
                itemEntity.updModifyInfo(itemOpEntity.getDataVerId(), brokerPort,
                        brokerTlsPort, brokerWebPort, regionId, groupId,
                        mngStatus, brokerProps);
                addedRecordMap.put(itemEntity.getBrokerId(), itemEntity);
            } else {
                // check and get brokerId field
                if (!WebParameterUtils.getIntParamValue(brokerObject,
                        WebFieldDef.BROKERID, true, sBuffer, result)) {
                    return result.isSuccess();
                }
                Integer brokerId = (Integer) result.getRetData();
                itemEntity = new BrokerConfEntity(itemOpEntity, brokerId, "");
                itemEntity.updModifyInfo(itemOpEntity.getDataVerId(), brokerPort, brokerTlsPort,
                        brokerWebPort, regionId, groupId, mngStatus, brokerProps);
                addedRecordMap.put(itemEntity.getBrokerId(), itemEntity);
            }
        }
        // check result
        if (addedRecordMap.isEmpty()) {
            result.setFailResult(sBuffer
                    .append("Not found record in ")
                    .append(WebFieldDef.BROKERJSONSET.name)
                    .append(" parameter!").toString());
            sBuffer.delete(0, sBuffer.length());
            return result.isSuccess();
        }
        result.setSuccResult(addedRecordMap);
        return result.isSuccess();
    }
Private method to add topic info

@param withTopic
@param sBuffer
@param topicConfEntityMap
@return
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/web/handler/WebBrokerConfHandler.java