private MessageProducer getProducer(String topic) throws TubeClientException {
        if (!producerMap.containsKey(topic)) {
            MessageProducer producer = sessionFactory.createProducer();
            // publish topic
            producer.publish(topic);
            producerMap.putIfAbsent(topic, producer);
        }
        return producerMap.get(topic);
    }
Get producer from cache, create it if not exists.

@param topic - topic name
@return MessageProducer
@throws TubeClientException
inlong-tubemq/tubemq-connectors/tubemq-connector-flume/src/main/java/org/apache/flume/sink/tubemq/TubemqSink.java