From: Kai Moritz Date: Sun, 11 Jun 2023 18:42:04 +0000 (+0200) Subject: Übung an die Übung `first-contact` angepasst X-Git-Tag: grundlagen/simple-producer---2023-06-signal~2 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=dad51c3acfc857974e4bd2b631eb007846fa225c;p=demos%2Fkafka%2Ftraining Übung an die Übung `first-contact` angepasst --- 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()