From 399edbf556a7e87f5111fb068491562f6fd4c6f2 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 2 Dec 2022 19:55:04 +0100 Subject: [PATCH] =?utf8?q?Hinweise=20erg=C3=A4nzt,=20weil=20sonst=20nicht?= =?utf8?q?=20klar=20war,=20was=20zu=20tun=20ist?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/de/juplo/kafka/ApplicationConfiguration.java | 2 +- src/main/java/de/juplo/kafka/RestProducer.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/juplo/kafka/ApplicationConfiguration.java b/src/main/java/de/juplo/kafka/ApplicationConfiguration.java index f1d773e..de7d0c4 100644 --- a/src/main/java/de/juplo/kafka/ApplicationConfiguration.java +++ b/src/main/java/de/juplo/kafka/ApplicationConfiguration.java @@ -40,7 +40,7 @@ public class ApplicationConfiguration props.put("linger.ms", properties.getLingerMs()); props.put("compression.type", properties.getCompressionType()); props.put("key.serializer", StringSerializer.class.getName()); - props.put("value.serializer", IntegerSerializer.class.getName()); + props.put("value.serializer", IntegerSerializer.class.getName()); // TODO: JsonSerializer return new KafkaProducer<>(props); } diff --git a/src/main/java/de/juplo/kafka/RestProducer.java b/src/main/java/de/juplo/kafka/RestProducer.java index 2e0da97..90dd2ce 100644 --- a/src/main/java/de/juplo/kafka/RestProducer.java +++ b/src/main/java/de/juplo/kafka/RestProducer.java @@ -30,6 +30,9 @@ public class RestProducer @RequestHeader(name = "X-id", required = false) Long correlationId, @RequestBody Integer number) { + // TODO: Wenn anstatt der Zahl "number" #number Nachrichten versendet + // werden muss der Zähler der folgenden Hilfsklasse entsprechend von + // 1 auf number angepasst werden! ResultRecorder result = new ResultRecorder(1); send(key, number, correlationId, result); -- 2.20.1