-
Long polling lets you consume messages from your Amazon SQS queue as soon as they become available.
-
To reduce the cost of using Amazon SQS and to decrease the number of empty receives to an empty queue (responses to the
ReceiveMessage
action which return no messages), enable long polling. For more information, see Amazon SQS Long Polling. -
To increase efficiency when polling for multiple threads with multiple receives, decrease the number of threads.
-
Long polling is preferable over short polling in most cases.
-
-
Short polling returns responses immediately, even if the polled Amazon SQS queue is empty.
-
To satisfy the requirements of an application that expects immediate responses to the
ReceiveMessage
request, use short polling. -
Short polling is billed the same as long polling.
-
Did this page help you? - Yes
Thanks for letting us know we're doing a good job!
If you've got a moment, please tell us what we did right so we can do more of it.
Did this page help you? - No
Thanks for letting us know this page needs work. We're sorry we let you down.
If you've got a moment, please tell us how we can make the documentation better.
Next topic:
Java SDK examplesPrevious topic:
Setting-up long polling in Amazon SQSNeed help?
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.