Wednesday, 9 October 2019

springboot how to schedule to pause kafka consumer and resume

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:

No comments:

Post a comment