@Override
    public void shutdown() throws TubeClientException {
        logger.info("[SHUTDOWN_TUBE] Shutting down tube factory...");
        if (this.shutdown.get()) {
            return;
        }
        if (this.shutdown.compareAndSet(false, true)) {
            for (final Shutdownable client : this.clientLst) {
                try {
                    client.shutdown();
                } catch (Throwable e) {
                    logger.error("[SHUTDOWN_TUBE] child shutdown failed", e);
                }
            }
            try {
                this.producerManager.shutdown();
            } catch (Throwable e2) {
                //
            }
            brokerRcvQltyStats.stopBrokerStatistic();
            try {
                rpcServiceFactory.destroy();
            } catch (Exception e2) {
                logger.error("Fail to destroy RpcServiceFactory!", e2);
            }
        }
    }
Initial Session factory

@param clientFactory      the client factory
@param tubeClientConfig   the tube client configure
inlong-tubemq/tubemq-client/src/main/java/org/apache/inlong/tubemq/client/factory/TubeBaseSessionFactory.java