From: Kai Moritz Date: Sun, 13 Nov 2022 13:29:09 +0000 (+0100) Subject: Konfiguration in @KafkaListener vereinfacht X-Git-Tag: spring-consumer--topicpartition-DEPRECATED~2 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=eb6234d2f2f6deceb46e94d5d019749879516aeb;p=demos%2Fkafka%2Ftraining Konfiguration in @KafkaListener vereinfacht --- diff --git a/src/main/java/de/juplo/kafka/SimpleConsumer.java b/src/main/java/de/juplo/kafka/SimpleConsumer.java index 31c7e6b..fe0479f 100644 --- a/src/main/java/de/juplo/kafka/SimpleConsumer.java +++ b/src/main/java/de/juplo/kafka/SimpleConsumer.java @@ -17,10 +17,7 @@ public class SimpleConsumer private String id; private long consumed = 0; - @KafkaListener( - id = "${spring.kafka.client-id}", - groupId = "${spring.kafka.consumer.group-id}", - topics = "${simple.consumer.topic}") + @KafkaListener(topics = "${simple.consumer.topic}") private void handleRecord( @Header(KafkaHeaders.RECEIVED_TOPIC) String topic,