From 3918096e6f6c76f371b37555bc93596e2da4ca81 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Thu, 30 Jun 2022 21:45:23 +0200 Subject: [PATCH] WIP --- .../kafka/wordcount/splitter/SplitterApplication.java | 10 ++-------- src/main/resources/integration.xml | 7 +++++++ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main/java/de/juplo/kafka/wordcount/splitter/SplitterApplication.java b/src/main/java/de/juplo/kafka/wordcount/splitter/SplitterApplication.java index fd3becd..d73beff 100644 --- a/src/main/java/de/juplo/kafka/wordcount/splitter/SplitterApplication.java +++ b/src/main/java/de/juplo/kafka/wordcount/splitter/SplitterApplication.java @@ -6,13 +6,10 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ImportResource; import org.springframework.expression.common.LiteralExpression; -import org.springframework.integration.annotation.InboundChannelAdapter; import org.springframework.integration.annotation.ServiceActivator; import org.springframework.integration.config.EnableIntegration; -import org.springframework.integration.kafka.inbound.KafkaMessageSource; import org.springframework.integration.kafka.outbound.KafkaProducerMessageHandler; import org.springframework.integration.support.MessageBuilder; -import org.springframework.kafka.core.ConsumerFactory; import org.springframework.kafka.core.KafkaTemplate; import org.springframework.kafka.listener.ConsumerProperties; import org.springframework.kafka.support.KafkaHeaders; @@ -48,13 +45,10 @@ public class SplitterApplication }; } - @InboundChannelAdapter(channel = "recordings") @Bean - KafkaMessageSource source( - ConsumerFactory cf, - SplitterApplicationProperties properties) + ConsumerProperties consumerProperties(SplitterApplicationProperties properties) { - return new KafkaMessageSource<>(cf, new ConsumerProperties(properties.getInputTopic())); + return new ConsumerProperties(properties.getInputTopic()); } @Bean diff --git a/src/main/resources/integration.xml b/src/main/resources/integration.xml index 14bd157..e6ba5bf 100644 --- a/src/main/resources/integration.xml +++ b/src/main/resources/integration.xml @@ -14,4 +14,11 @@ + + -- 2.20.1