Short polling
- might just receive a subset of messages in the queue
Long polling (recommended)
- Frequency is lower compare to short polling, and long polling waits longer
- When
WaitTime
is greater than 0, long polling is in effect
- Long-poll requests wait up to 20 seconds for the next message to arrive when the queue is empty - prevent from keep polling empty queue
- Still return when a message is available (it just waits longer for a available message)
- Save cost as long as consumers can wait a bit