How to control/limit the tasks that are submitted to a ExecutorService? I have SMSTask that sends SMS messages and I need to control the executor so that it can only send at maximum N messages/second.
How to control/limit the tasks that are submitted to a ExecutorService ? I have
Share
Assuming you are creating one SMS message per task you can use a ScheduleExecutorService.
Add tasks to the queue and they will be processed at a rate of 10 per second.