private static Producer<String, String> getProducer() { if (DataTypeUtil.isNotEmpty(producer)) { return producer; } producer = new Producer<String, String>(getConfig()); return producer; }
private static ProducerConfig getConfig() { if (DataTypeUtil.isNotEmpty(config)) { return config; } config = new ProducerConfig(InitKafka.productor); return config; }