private boolean getTopicDeployJsonSetInfo(HttpServletRequest req, boolean isAddOp,
            BaseEntity defOpEntity, StringBuilder sBuffer,
            ProcessResult result) {
        if (!WebParameterUtils.getJsonArrayParamValue(req,
                WebFieldDef.TOPICJSONSET, true, null, result)) {
            return result.isSuccess();
        }
        List<Map<String, String>> deployJsonArray =
                (List<Map<String, String>>) result.getRetData();
        TopicDeployEntity itemConf;
        Map<String, TopicDeployEntity> addRecordMap = new HashMap<>();
        // check and get topic deployment configure
        for (Map<String, String> confMap : deployJsonArray) {
            // check and get operation info
            if (!WebParameterUtils.getAUDBaseInfo(confMap,
                    isAddOp, defOpEntity, sBuffer, result)) {
                return result.isSuccess();
            }
            final BaseEntity itemOpEntity = (BaseEntity) result.getRetData();
            // get topicName configure info
            if (!WebParameterUtils.getStringParamValue(confMap,
                    WebFieldDef.TOPICNAME, true, "", sBuffer, result)) {
                return result.isSuccess();
            }
            String topicName = (String) result.getRetData();
            // get broker configure info
            if (!getBrokerConfInfo(confMap, sBuffer, result)) {
                return result.isSuccess();
            }
            BrokerConfEntity brokerConf =
                    (BrokerConfEntity) result.getRetData();
            // get and valid TopicPropGroup info
            if (!WebParameterUtils.getTopicPropInfo(confMap,
                    (isAddOp ? brokerConf.getTopicProps() : null), sBuffer, result)) {
                return result.isSuccess();
            }
            final TopicPropGroup topicPropInfo = (TopicPropGroup) result.getRetData();
            // get topicNameId field
            int topicNameId = TBaseConstants.META_VALUE_UNDEFINED;
            TopicCtrlEntity topicCtrlEntity =
                    defMetaDataService.getTopicCtrlByTopicName(topicName);
            if (topicCtrlEntity != null) {
                topicNameId = topicCtrlEntity.getTopicId();
            }
            // set valid topicStatus info
            TopicStatus topicStatus = TopicStatus.STATUS_TOPIC_UNDEFINED;
            if (isAddOp) {
                topicStatus = TopicStatus.STATUS_TOPIC_OK;
            }
            itemConf = new TopicDeployEntity(itemOpEntity,
                    brokerConf.getBrokerId(), topicName);
            itemConf.updModifyInfo(itemOpEntity.getDataVerId(), topicNameId,
                    brokerConf.getBrokerPort(), brokerConf.getBrokerIp(),
                    topicStatus, topicPropInfo);
            addRecordMap.put(itemConf.getRecordKey(), itemConf);
        }
        // check result
        if (addRecordMap.isEmpty()) {
            result.setFailResult(sBuffer
                    .append("Not found record in ")
                    .append(WebFieldDef.TOPICJSONSET.name)
                    .append(" parameter!").toString());
            sBuffer.delete(0, sBuffer.length());
            return result.isSuccess();
        }
        result.setSuccResult(addRecordMap);
        return result.isSuccess();
    }
Query topic info

@param req       Http Servlet Request
@param sBuffer   string buffer
@param result    process result
@return    process result
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/web/handler/WebTopicDeployHandler.java