Have a query around the below example scenario from the docs
Example:
Let’s consider a scenario where the container is configured for: maxConcurrentMessages = 20, maxMessagesPerPoll = 10, maxDelayBetweenPolls = 5 seconds, and a pollTimeout = 10 seconds.
The container starts in low throughput mode, meaning it’ll attempt a single poll for 10 messages. If any messages are returned, it’ll switch to high throughput mode, and will make up to 2 simultaneous polls for 10 messages each. If all 20 messages are retrieved, it’ll not attempt any more polls until messages are processed. If after the 5 seconds for maxDelayBetweenPolls 6 messages have been processed, the framework will poll for the 6 messages. If the queue is depleted and a poll returns no messages, it’ll enter low throughput mode again and perform only one poll at a time.
Query:
In the above example,
i) What happens if all the 20 messages polled are processed within 1 second. Will we will wait for 5 seconds (which is the value for maxDelayBetweenPolls) , to poll for the next set of messages?
If this is the case, is there any way to not wait for maxDelayBetweenPolls seconds and instead as soon as a worker thread is available we poll for as many messages as the number of worker threads available.