I have a spring-boot app which utilizes spring-kafka with the @KafkaListener annotation.
I am looking for a way to interact with the consumer such that I can disable the consumer runtime without having to stop the rest of the app, preferably by flipping some boolean flag. Does spring-kafka supply some way to do this?
Use the KafkaListenerEndpointRegistry
to find, start, and stop all/any listeners.
https://docs.spring.io/spring-kafka/reference/kafka/receiving-messages/kafkalistener-lifecycle.html