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?