From da7dc62b79d545f3cc15881e91e99ab979bc93ad Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 2 Nov 2024 22:12:30 +0100 Subject: [PATCH] WIP --- src/main/java/de/juplo/kafka/ApplicationConfiguration.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/juplo/kafka/ApplicationConfiguration.java b/src/main/java/de/juplo/kafka/ApplicationConfiguration.java index 1546f2d..7883cf7 100644 --- a/src/main/java/de/juplo/kafka/ApplicationConfiguration.java +++ b/src/main/java/de/juplo/kafka/ApplicationConfiguration.java @@ -23,11 +23,11 @@ public class ApplicationConfiguration @Bean public ExampleConsumer exampleConsumer( Consumer kafkaConsumer, + Producer kafkaProducer, ApplicationProperties properties, Clock clock, ConfigurableApplicationContext applicationContext) { - Producer kafkaProducer = kafkaProducer(properties); return new ExampleConsumer( properties.getClientId(), @@ -65,6 +65,7 @@ public class ApplicationConfiguration return new KafkaConsumer<>(props); } + @Bean(destroyMethod = "") KafkaProducer kafkaProducer(ApplicationProperties properties) { Properties props = new Properties(); -- 2.20.1