
Answer-first summary for fast verification
Answer: Use LongPolling
Use LongPolling 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.
As an AWS Certified Developer Associate, you are responsible for optimizing costs and ensuring efficient usage of AWS services within your application. Recently, after an analysis of your monthly AWS bill, you observed a significant increase in the cost associated with Amazon Simple Queue Service (Amazon SQS). This increase in cost occurred after you added new SQS queues. Despite this cost hike, you know that the clients interacting with these queues are not generating substantial traffic and are often receiving empty responses.
Given this scenario, what actions should you consider taking to address the issue?
A
Increase the VisibilityTimeout
B
Decrease DelaySeconds
C
Use LongPolling
D
Use a FIFO queue
No comments yet.