We gave our notification executor fifty threads and it sent everything on one
java
dev.to
Our delivery service sends customers a text with their two hour delivery window on the morning of delivery. The text is sent asynchronously: the service marks a method @async and Spring runs it on an executor we define as a bean, a ThreadPoolTaskExecutor with setMaxPoolSize(50) and a thread name prefix. We had sized that number carefully against our SMS provider's rate limit. On a Tuesday in October the provider had a slow morning, with each call taking about three seconds instead of a hundred