From: Kai Moritz Date: Sat, 12 Nov 2022 22:10:09 +0000 (+0100) Subject: Vorlage X-Git-Tag: spring-consumer--kafkalistener--vorlage---lvm-2-tage--easy-path X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=6f031ecd6c7b06212aae0c38b279c497a0f67464;p=demos%2Fkafka%2Ftraining Vorlage --- diff --git a/pom.xml b/pom.xml index b908802..6528ee9 100644 --- a/pom.xml +++ b/pom.xml @@ -61,10 +61,6 @@ - - pl.project13.maven - git-commit-id-plugin - org.springframework.boot spring-boot-maven-plugin diff --git a/src/main/java/de/juplo/kafka/SimpleConsumer.java b/src/main/java/de/juplo/kafka/SimpleConsumer.java index fe0479f..e9ce220 100644 --- a/src/main/java/de/juplo/kafka/SimpleConsumer.java +++ b/src/main/java/de/juplo/kafka/SimpleConsumer.java @@ -17,17 +17,11 @@ public class SimpleConsumer private String id; private long consumed = 0; - @KafkaListener(topics = "${simple.consumer.topic}") private void handleRecord( - @Header(KafkaHeaders.RECEIVED_TOPIC) String topic, - @Header(KafkaHeaders.RECEIVED_PARTITION_ID) Integer partition, - @Header(KafkaHeaders.OFFSET) Long offset, - @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY) String key, - @Payload String value) { consumed++;