spring-cloud-aws
spring-cloud-aws copied to clipboard
Polling thread behaviour
I have small doubt regarding how polling thread behaves.
Let us take a scenario where i have maxNumberOfMessages to be received per poll is 10. And We are using DEFAULT_WAIT_TIME = 20 seconds. I want to know how it behaves in different scenarios mentioned below.
- If there are 5-6 messages in queue. Then how many can be returned? And will polling thread wait for some time to get more messages?
- If there are no messages in queue, will it wait till it gets one messages or will it wait for more than that?
- If there are above 10 messages in queue, then how will it behave?
There are messages in queue and we expect them to be returned in at least 2-3 polls but that is not happening. And sometimes it is taking more than 10-15 polls. Within those 10-15 polls we don't see 10 messages received per poll at least once.