From dad51c3acfc857974e4bd2b631eb007846fa225c Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sun, 11 Jun 2023 20:42:04 +0200 Subject: [PATCH] =?utf8?q?=C3=9Cbung=20an=20die=20=C3=9Cbung=20`first-cont?= =?utf8?q?act`=20angepasst?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/de/juplo/kafka/SimpleProducer.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/de/juplo/kafka/SimpleProducer.java b/src/main/java/de/juplo/kafka/SimpleProducer.java index 9e3bad7..db554d7 100644 --- a/src/main/java/de/juplo/kafka/SimpleProducer.java +++ b/src/main/java/de/juplo/kafka/SimpleProducer.java @@ -28,10 +28,9 @@ public class SimpleProducer props.put("key.serializer", StringSerializer.class.getName()); props.put("value.serializer", StringSerializer.class.getName()); - producer = new KafkaProducer<>(props); - - this.topic = topic; this.id = clientId; + this.topic = topic; + producer = new KafkaProducer<>(props); } public void run() -- 2.20.1