private void createMessageSender() {
        String managerAddr = conf.get(AGENT_MANAGER_ADDR);
        String authSecretId = conf.get(AGENT_MANAGER_AUTH_SECRET_ID);
        String authSecretKey = conf.get(AGENT_MANAGER_AUTH_SECRET_KEY);
        TcpMsgSenderConfig proxyClientConfig;
        try {
            proxyClientConfig = new TcpMsgSenderConfig(managerAddr,
                    INLONG_AGENT_SYSTEM, authSecretId, authSecretKey);
            proxyClientConfig.setMaxInFlightSizeInKb(
                    CommonConstants.DEFAULT_PROXY_TOTAL_ASYNC_PROXY_SIZE_KB);
            proxyClientConfig.setAliveConnections(CommonConstants.DEFAULT_PROXY_ALIVE_CONNECTION_NUM);
            proxyClientConfig.setNettyWorkerThreadNum(CommonConstants.DEFAULT_PROXY_CLIENT_IO_THREAD_NUM);
            proxyClientConfig.setRequestTimeoutMs(30000L);
            ThreadFactory SHARED_FACTORY = new DefaultThreadFactory("agent-sender-manager-heartbeat",
                    Thread.currentThread().isDaemon());
            sender = new InLongTcpMsgSender(proxyClientConfig, SHARED_FACTORY);
            // start sender object
            ProcessResult procResult = new ProcessResult();
            if (!sender.start(procResult)) {
                sender.close();
                throw new ProxySdkException("Sender start failure, " + procResult);
            }
        } catch (Throwable ex) {
            LOGGER.error("heartbeat manager create sdk failed: ", ex);
        }
    }
build dead heartbeat message of agent
inlong-agent/agent-core/src/main/java/org/apache/inlong/agent/core/HeartbeatManager.java