Wednesday, 9 October 2019

springboot how to schedule to pause kafka consumer and resume



https://blog.csdn.net/gwd1154978352/article/details/79358757


1. just add "@EnableScheduling" in your application
2. create a component and add "@Scheduled(cron="0 50 * * * ?"" in a method
3. and above method will be called like a corn job


Then, you can just follow this to pause and resume your kafka:

https://baiduhix.blogspot.com/2019/10/how-to-pause-kafka-consumer.html

No comments:

Post a comment