private void destroyConnection() {
        for (Map.Entry<String, MessageProducer> entry : producerMap.entrySet()) {
            MessageProducer producer = entry.getValue();
            try {
                producer.shutdown();
            } catch (TubeClientException e) {
                logger.error("destroy producer error in tubesink, MetaClientException {}", e.getMessage());
            } catch (Throwable e) {
                logger.error("destroy producer error in tubesink, ex {}", e.getMessage());
            }
        }
        producerMap.clear();

        if (sessionFactory != null) {
            try {
                sessionFactory.shutdown();
            } catch (Exception e) {
                logger.error("destroy sessionFactory error in tubesink, ex {}", e.getMessage());
            }
        }
        sessionFactory = null;
        logger.debug("closed meta producer");
    }
If this function is called successively without calling {@see #destroyConnection()}, only the
first call has any effect.

@throws FlumeException if an RPC client connection could not be opened
inlong-audit/audit-proxy/src/main/java/org/apache/inlong/audit/sink/TubeSink.java