@Override
    public boolean brokerClose2M(int brokerId, StringBuilder sBuffer, ProcessResult result) {
        BrokerRunStatusInfo runStatusInfo =
                brokerRunSyncManageMap.get(brokerId);
        if (runStatusInfo == null) {
            result.setFailResult(TErrCodeConstants.HB_NO_NODE, sBuffer
                    .append("Not found Broker run status info, please register broker first!")
                    .append(" the connecting client id is:").append(brokerId).toString());
            return result.isSuccess();
        }
        if (!heartbeatManager.unRegBrokerNode(String.valueOf(brokerId),
                runStatusInfo.getCreateId())) {
            logger.info(sBuffer.append("[Broker Closed] brokerId=").append(brokerId)
                    .append(" unregister failure, run-info has been replaced by new request!")
                    .toString());
            return result.isSuccess();
        }
        boolean isOverTls = runStatusInfo.isOverTLS();
        releaseBrokerRunInfo(brokerId, runStatusInfo.getCreateId(), false);
        logger.info(sBuffer.append("[Broker Closed] brokerId=").append(brokerId)
                .append(" unregister success, isOverTLS=").append(isOverTls).toString());
        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