From e67f2d3a518136172c7a02387a374f21b541afb3 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 16 Sep 2022 11:41:25 +0200 Subject: [PATCH] Vorlage --- docker-compose.yml | 6 +++--- src/main/java/de/juplo/kafka/ApplicationRecordHandler.java | 6 ------ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index a3da553..9202d6c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: diff --git a/src/main/java/de/juplo/kafka/ApplicationRecordHandler.java b/src/main/java/de/juplo/kafka/ApplicationRecordHandler.java index a3b849e..205d3a1 100644 --- a/src/main/java/de/juplo/kafka/ApplicationRecordHandler.java +++ b/src/main/java/de/juplo/kafka/ApplicationRecordHandler.java @@ -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()) -- 2.20.1