From: Kai Moritz Date: Fri, 1 Apr 2022 13:32:41 +0000 (+0200) Subject: Vorlage X-Git-Tag: endless-stream-consumer-vorlage-DEPRECATED~2 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=31cbcf64f6ce68e1df60f1a7283393502d521531;p=demos%2Fkafka%2Ftraining Vorlage --- diff --git a/src/main/java/de/juplo/kafka/EndlessConsumer.java b/src/main/java/de/juplo/kafka/EndlessConsumer.java index b3dd446..b64a95e 100644 --- a/src/main/java/de/juplo/kafka/EndlessConsumer.java +++ b/src/main/java/de/juplo/kafka/EndlessConsumer.java @@ -68,24 +68,7 @@ public class EndlessConsumer implements Runnable while (true) { - ConsumerRecords records = - consumer.poll(Duration.ofSeconds(1)); - - // Do something with the data... - log.info("{} - Received {} messages", id, records.count()); - for (ConsumerRecord record : records) - { - consumed++; - log.info( - "{} - {}: {}/{} - {}={}", - id, - record.offset(), - record.topic(), - record.partition(), - record.key(), - record.value() - ); - } + // TODO: Nachrichten abrufen und verarbeiten } } catch(WakeupException e)