Konfiguration in @KafkaListener vereinfacht
authorKai Moritz <kai@juplo.de>
Sun, 13 Nov 2022 13:29:09 +0000 (14:29 +0100)
committerKai Moritz <kai@juplo.de>
Sun, 13 Nov 2022 17:01:32 +0000 (18:01 +0100)
src/main/java/de/juplo/kafka/SimpleConsumer.java

index 31c7e6b..fe0479f 100644 (file)
@@ -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,