@Override
    public boolean brokerRegister2M(String clientId, BrokerInfo brokerInfo,
            long reportConfigId, int reportCheckSumId,
            boolean isTackData, String repBrokerConfInfo,
            List<String> repTopicConfInfo, boolean isOnline,
            boolean isOverTLS, StringBuilder sBuffer,
            ProcessResult result) {
        BrokerConfEntity brokerEntry =
                metaDataService.getBrokerConfByBrokerId(brokerInfo.getBrokerId());
        if (brokerEntry == null) {
            result.setFailResult(TErrCodeConstants.BAD_REQUEST,
                    sBuffer.append("Not found broker configure info, please create first!")
                            .append(" the connecting client id is:")
                            .append(clientId).toString());
            sBuffer.delete(0, sBuffer.length());
            return result.isSuccess();
        }
        if ((!brokerInfo.getHost().equals(brokerEntry.getBrokerIp()))
                || (brokerInfo.getPort() != brokerEntry.getBrokerPort())) {
            result.setFailResult(TErrCodeConstants.BAD_REQUEST,
                    sBuffer.append("Inconsistent broker configure,please confirm first!")
                            .append(" the connecting client id is:").append(clientId)
                            .append(", the configured broker address by brokerId is:")
                            .append(brokerEntry.getBrokerIdAndAddress()).toString());
            sBuffer.delete(0, sBuffer.length());
            return result.isSuccess();
        }
        int confTLSPort = brokerEntry.getBrokerTLSPort();
        if (confTLSPort != brokerInfo.getTlsPort()) {
            result.setFailResult(TErrCodeConstants.BAD_REQUEST,
                    sBuffer.append("Inconsistent TLS configure, please confirm first!")
                            .append(" the connecting client id is:").append(clientId)
                            .append(", the configured TLS port is:").append(confTLSPort)
                            .append(", the broker reported TLS port is ")
                            .append(brokerInfo.getTlsPort()).toString());
            sBuffer.delete(0, sBuffer.length());
            return result.isSuccess();
        }
        if (brokerEntry.getManageStatus() == ManageStatus.STATUS_MANAGE_APPLY) {
            result.setFailResult(TErrCodeConstants.BAD_REQUEST,
                    sBuffer.append("Broker's configure not online, please online configure first!")
                            .append(" the connecting client id is:").append(clientId).toString());
            sBuffer.delete(0, sBuffer.length());
            return result.isSuccess();
        }
        brokerEntry.getBrokerDefaultConfInfo(
                metaDataService.getClusterDefSetting(false), sBuffer);
        String brokerConfInfo = sBuffer.toString();
        sBuffer.delete(0, sBuffer.length());
        Map<String, String> topicConfInfoMap =
                metaDataService.getBrokerTopicStrConfigInfo(brokerEntry, sBuffer);
        //
        BrokerRunStatusInfo runStatusInfo =
                brokerRunSyncManageMap.get(brokerInfo.getBrokerId());
        if (runStatusInfo == null) {
            BrokerRunStatusInfo tmpRunStatusInfo =
                    new BrokerRunStatusInfo(this, brokerInfo,
                            brokerEntry.getManageStatus(), brokerConfInfo,
                            topicConfInfoMap, isOverTLS);
            runStatusInfo =
                    brokerRunSyncManageMap.putIfAbsent(
                            brokerInfo.getBrokerId(), tmpRunStatusInfo);
            if (runStatusInfo == null) {
                brokerTotalCount.incrementAndGet();
                MasterSrvStatsHolder.incBrokerOnlineCnt();
                runStatusInfo = tmpRunStatusInfo;
            }
        } else {
            runStatusInfo.reInitRunStatusInfo(brokerInfo,
                    brokerEntry.getManageStatus(), brokerConfInfo,
                    topicConfInfoMap, isOverTLS);
        }
        runStatusInfo.bookBrokerReportInfo(true, isOnline, reportConfigId,
                reportCheckSumId, isTackData, repBrokerConfInfo, repTopicConfInfo, sBuffer);
        heartbeatManager.regBrokerNode(String.valueOf(brokerInfo.getBrokerId()),
                runStatusInfo.getCreateId());
        result.setSuccResult(null);
        return result.isSuccess();
    }
Constructor by TMaster

@param tMaster  the initial TMaster object
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/master/nodemanage/nodebroker/DefBrokerRunManager.java