AWS Certified Developer Associate Practice Exam

Question: 1 / 400

What must be done to ensure an SQS message remains unprocessed for a duration longer than the default visibility timeout?

Use long polling

Implement message batching

Call ChangeMessageVisibility

To ensure that an Amazon SQS (Simple Queue Service) message remains unprocessed for a duration longer than the default visibility timeout, it is necessary to call the ChangeMessageVisibility action. This action allows you to dynamically change the visibility timeout for a specific message in the queue.

When a message is received from an SQS queue, it becomes invisible to other consumers for a default period (the visibility timeout). If the processing of that message takes longer than this visibility timeout, the message can become visible again, leading to potential duplication of processing. By using ChangeMessageVisibility, you can extend the invisibility period for that message, preventing other consumers from processing it until you confirm that the processing has completed. This is particularly useful in scenarios where message processing may vary in time, ensuring the message does not get reprocessed prematurely.

In contrast, long polling and message batching serve different purposes. Long polling is a way to retrieve messages from the queue without having to constantly poll the queue at short intervals for messages, while message batching allows sending or receiving multiple messages in a single request, which can optimize performance but does not affect visibility timeout. Modifying message retention pertains to how long messages are kept in the queue after they are sent, which is unrelated to visibility timeout

Get further explanation with Examzify DeepDiveBeta

Modify message retention

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy