I work on Spring Boot application, which uses Spring Cloud Stream for integration with Kafka.
I need to pause receiving messages from Kafka programmatically. I khow about possibility to manage lifecycle of bindings by actuator endpoint (docs).
So i can autowire org.springframework.cloud.stream.endpoint.BindingsEndpoint
and use it's public methods. But it seems to me little strange...
Is there better way to manage lifecycle of bindings programmatically?