I'm trying to implement reactive kafka consumer in my Spring boot application and I'm looking at these examples: https://github.com/reactor/reactor-kafka/blob/master/reactor-kafka-samples/src/main/java/reactor/kafka/samples/SampleScenarios.java
and it looks like there is no support for Spring in reactive kafka yet
I understand how kafka listeners work in non-reactive kafka API in Spring: simplest solution is to configure beans for ConcurrentKafkaListenerContainerFactory and ConsumerFactory, then use @KafkaListener annotation and voila
But I'm not sure how to properly use reactive kafka in Spring right now.
Basically I need a listener for topic. Should I create some kind of loop or scheduler of my own? Or maybe I'm missing something. Can anyone share their knowledge and best practices?
ReactiveKafkaConsumerTemplate
in Spring for Apache Kafka project: github.com/spring-projects/spring-kafka/blob/master/… ? – Artem Bilan@KafkaListener
is on the road map for next year. Right now, all we have is the lightweight wrapper that Artem mentioned. That said, managing partition offsets for a reactive (or any async) consumer is particularly difficult. – Gary Russell