@Override
                    public void run() {
                        if (!shutdown.get()) {
                            long currErrCnt = heartbeatErrors.get();
                            if (currErrCnt > maxReleaseTryCnt) {
                                if (currErrCnt % 2 == 0) {
                                    heartbeatErrors.incrementAndGet();
                                    return;
                                }
                            }
                            try {
                                HeartResponseM2B response =
                                        masterService.brokerHeartbeatB2M(createBrokerHeartBeatRequest(),
                                                tubeConfig.getHostName(), false);
                                if (!response.getSuccess()) {
                                    isKeepAlive.set(false);
                                    if (response.getErrCode() == TErrCodeConstants.HB_NO_NODE) {
                                        BrokerSrvStatsHolder.incBrokerTimeoutCnt();
                                        register2Master();
                                        heartbeatErrors.set(0);
                                        logger.info("Re-register to master successfully!");
                                    }
                                    return;
                                }
                                isKeepAlive.set(true);
                                heartbeatErrors.set(0);
                                StringBuilder sBuilder = new StringBuilder(512);
                                procConfigFromHeartBeat(sBuilder, response);
                            } catch (Throwable t) {
                                isKeepAlive.set(false);
                                heartbeatErrors.incrementAndGet();
                                BrokerSrvStatsHolder.incBrokerHBExcCnt();
                                samplePrintCtrl.printExceptionCaught(t);
                            }
                        }
                    }
Start broker service.

@throws Exception  the exception during processing
inlong-tubemq/tubemq-server/src/main/java/org/apache/inlong/tubemq/server/broker/TubeBroker.java