From: Kai Moritz Date: Sat, 2 Nov 2024 21:12:30 +0000 (+0100) Subject: WIP X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=da7dc62b79d545f3cc15881e91e99ab979bc93ad;p=demos%2Fkafka%2Ftraining WIP --- 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();