From fc97fc7bb1b7219329183cdbfc0e861375a3cb04 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 24 Sep 2022 20:25:39 +0200 Subject: [PATCH] =?utf8?q?Initiale=20Lese-Position=20auf=20die=20=C3=A4lte?= =?utf8?q?ste=20bekannte=20Nachricht=20gesetzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/de/juplo/kafka/SimpleConsumer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/de/juplo/kafka/SimpleConsumer.java b/src/main/java/de/juplo/kafka/SimpleConsumer.java index 586bd07..cab2fb8 100644 --- a/src/main/java/de/juplo/kafka/SimpleConsumer.java +++ b/src/main/java/de/juplo/kafka/SimpleConsumer.java @@ -28,6 +28,7 @@ public class SimpleConsumer props.put("bootstrap.servers", broker); props.put("group.id", groupId); // ID für die Offset-Commits props.put("client.id", clientId); // Nur zur Wiedererkennung + props.put("auto.offset.reset", "earliest"); // Von Beginn an lesen props.put("partition.assignment.strategy", "org.apache.kafka.clients.consumer.CooperativeStickyAssignor"); props.put("key.deserializer", StringDeserializer.class.getName()); props.put("value.deserializer", StringDeserializer.class.getName()); -- 2.20.1