Describe the issue
I have a use case : to get an boolean flag from an API(call happens every 5 min) and in case if its false i want to stop the message consumption . I can use KafkaListenerEndpointRegistry in spring kafka implementation .
But we are using spring cloud stream , and I don't see any code on how to turn off message consumption .
so I have used function composition , flagCheck|consume , But this does not turn off message consumption ,
Expected behavior
Some alternate to turn off the messages when flag is off and enable consumption when flag is ON in spring cloud stream.