
Answer-first summary for fast verification
Answer: Use SQS long polling to retrieve messages from your Amazon SQS queues
Use SQS long polling to retrieve messages from your Amazon SQS queues Amazon Simple Queue Service (SQS) is a fully managed message queuing service that enables you to decouple and scale microservices, distributed systems, and serverless applications. Amazon SQS provides short polling and long polling to receive messages from a queue. By default, queues use short polling. With short polling, Amazon SQS sends the response right away, even if the query found no messages. With long polling, Amazon SQS sends a response after it collects at least one available message, up to the maximum number of messages specified in the request. Amazon SQS sends an empty response only if the polling wait time expires. Long polling makes it inexpensive to retrieve messages from your Amazon SQS queue as soon as the messages are available. Long polling helps reduce the cost of using Amazon SQS by eliminating the number of empty responses (when there are no messages available for a ReceiveMessage request) and false empty responses (when messages are available but aren't included in a response). When the wait time for the ReceiveMessage API action is greater than 0, long polling is in effect. The maximum long polling wait time is 20 seconds.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A high-frequency stock trading firm is in the process of transitioning their messaging queues from self-managed message-oriented middleware systems to Amazon Simple Queue Service (SQS). The development team is focused on minimizing the operational costs associated with using SQS.
As a Developer Associate, which of the following recommendations would you make to help the firm reduce the costs of utilizing Amazon SQS in this scenario?
A
Use SQS visibility timeout to retrieve messages from your Amazon SQS queues
B
Use SQS message timer to retrieve messages from your Amazon SQS queues
C
Use SQS short polling to retrieve messages from your Amazon SQS queues
D
Use SQS long polling to retrieve messages from your Amazon SQS queues
No comments yet.