com.github.imrafaelmerino.kafkacli.KafkaProducers Maven / Gradle / Ivy
package com.github.imrafaelmerino.kafkacli;
import jio.cli.ConsoleLogger;
import jsonvalues.JsObj;
import org.apache.kafka.clients.producer.KafkaProducer;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import java.util.function.Function;
final class KafkaProducers implements Function> {
private final Map> producers;
KafkaProducers() {
producers = new HashMap<>();
Runtime.getRuntime()
.addShutdownHook(new Thread(() -> {
for (KafkaProducer