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