I have a spring application that reads messages from kafka, I want when I enable maintenance my application will not read messages from kafka anymore and when I turn off maintenance it will return to normal reading
CodePudding user response:
We can invoke the pause( )/resume( ) on the KafkaListener. Refer
https://docs.spring.io/spring-kafka/reference/html/#pause-resume