From: Kai Moritz Date: Wed, 2 Nov 2022 17:55:37 +0000 (+0100) Subject: WIP:StringDeserializer X-Git-Tag: simple-consumer--json-DEPRECATED~18 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=dc93d0954cdeba58482946ee0c78b9ca93e7d35d;p=demos%2Fkafka%2Ftraining WIP:StringDeserializer --- diff --git a/src/main/java/de/juplo/kafka/SimpleConsumer.java b/src/main/java/de/juplo/kafka/SimpleConsumer.java index 49eca1a..d53f5e5 100644 --- a/src/main/java/de/juplo/kafka/SimpleConsumer.java +++ b/src/main/java/de/juplo/kafka/SimpleConsumer.java @@ -19,7 +19,7 @@ public class SimpleConsumer implements Runnable private final ExecutorService executor; private final String id; private final String topic; - private final Consumer consumer; + private final Consumer consumer; private long consumed = 0; @@ -34,11 +34,11 @@ public class SimpleConsumer implements Runnable while (true) { - ConsumerRecords records = + ConsumerRecords records = consumer.poll(Duration.ofSeconds(1)); log.info("{} - Received {} messages", id, records.count()); - for (ConsumerRecord record : records) + for (ConsumerRecord record : records) { consumed++; log.info(