I'm developing a spring integration app which has a Kafka outbound channel adaptor and configuring the flows using spring integration java dsl.
- spring-integration-core : 4.2.4.RELEASE
- spring-integration-kafka :1.3.0.RELEASE
- spring-integration-java-dsl : 1.1.2.RELEASE
I have configured the message handler spec similar to the following snippet.
KafkaProducerMessageHandlerSpec messageHandlerSpec = Kafka
.outboundChannelAdapter()
.addProducer(new ProducerMetadata<String, byte[]>(topicName, String.class, byte[].class,
new StringSerializer(), new ByteArraySerializer()), "localhost:9092");
I wish to add a ProducerListener. This capability was added to spring integration kafka here. https://github.com/spring-projects/spring-integration-kafka/pull/80
Can you please provide with me with the appropriate mechanism to add the ProducerListener using the Java DSL.
Thanks.