Vorlage sumup-adder--springified--nur-json-deserializer
authorKai Moritz <kai@juplo.de>
Fri, 16 Sep 2022 09:41:25 +0000 (11:41 +0200)
committerKai Moritz <kai@juplo.de>
Fri, 16 Sep 2022 16:09:23 +0000 (18:09 +0200)
docker-compose.yml
src/main/java/de/juplo/kafka/ApplicationRecordHandler.java

index a3da553..9202d6c 100644 (file)
@@ -99,13 +99,13 @@ services:
     command: sleep infinity
 
   gateway:
-    image: juplo/sumup-gateway--springified:1.0-SNAPSHOT
+    image: juplo/sumup-gateway:1.0-SNAPSHOT
     ports:
       - 8080:8080
     environment:
       server.port: 8080
-      spring.kafka.bootstrap-servers: kafka:9092
-      spring.kafka.client-id: gateway
+      sumup.gateway.bootstrap-server: kafka:9092
+      sumup.gateway.client-id: gateway
       sumup.gateway.topic: in
 
   requests-1:
index a3b849e..205d3a1 100644 (file)
@@ -40,15 +40,9 @@ public class ApplicationRecordHandler
     results.addResults(partition, user, result);
   }
 
-  @KafkaListener(
-      id = "${spring.kafka.consumer.group-id}",
-      topics = "${sumup.adder.topic}")
   public void accept(
-      @Header(KafkaHeaders.RECEIVED_PARTITION_ID)
       Integer partition,
-      @Header(KafkaHeaders.RECEIVED_MESSAGE_KEY)
       String user,
-      @Payload
       Message message)
   {
     switch(message.getType())