You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I used the @SQSListener annotation and defined the maxConcurrentMessages parameter to 100. When consuming messages I first produced 100 messages and then consumed them via an spring cloud app. When looking at the logs and the threads involved I never noticed more than 10 threads consuming messages in parallel.
After further investigation I noticed that the threadPool created by the default listener has a core number of threads set to 10, the max number to 100, and the queueCapacity to 100, but it never added more threads to the pool than the core number because it requires the queue to be full. That never happens because the logic to poll the sqs queue will never ask for more messages than permits and this will never be more than 100.
To work around that, I used a custom threadpool stack with the core number set to 100. With that it nicely consumed those 100 messages in parallel.
The text was updated successfully, but these errors were encountered:
Type: Bug
Component:
"SQS"
Describe the bug
I used the @SQSListener annotation and defined the maxConcurrentMessages parameter to 100. When consuming messages I first produced 100 messages and then consumed them via an spring cloud app. When looking at the logs and the threads involved I never noticed more than 10 threads consuming messages in parallel.
After further investigation I noticed that the threadPool created by the default listener has a core number of threads set to 10, the max number to 100, and the queueCapacity to 100, but it never added more threads to the pool than the core number because it requires the queue to be full. That never happens because the logic to poll the sqs queue will never ask for more messages than permits and this will never be more than 100.
To work around that, I used a custom threadpool stack with the core number set to 100. With that it nicely consumed those 100 messages in parallel.
The text was updated successfully, but these errors were encountered: