@Bean
public ExampleConsumer exampleConsumer(
Consumer<String, String> kafkaConsumer,
+ Producer<String, String> kafkaProducer,
ApplicationProperties properties,
Clock clock,
ConfigurableApplicationContext applicationContext)
{
- Producer<String, String> kafkaProducer = kafkaProducer(properties);
return
new ExampleConsumer(
properties.getClientId(),
return new KafkaConsumer<>(props);
}
+ @Bean(destroyMethod = "")
KafkaProducer<String, String> kafkaProducer(ApplicationProperties properties)
{
Properties props = new Properties();