An application consumes messages from an Amazon SQS queue but sometimes the application is down, causing messages to expire and be deleted after 1 day, resulting in data loss. Which actions will reduce data loss for the application? (Choose two.)
Choose an answer
Tap an option to check your answer.
Correct answer: Increase the message retention period, Attach a dead-letter queue (DLQ) to the SQS queue..
Why this is the answer
Increasing the message retention period directly addresses the problem of messages expiring and being deleted. By extending this period (up to 14 days), messages will remain in the queue longer, giving the application more time to process them even if it experiences downtime. Attaching a dead-letter queue (DLQ) is another crucial step. If messages fail to be processed successfully after a certain number of retries, or if they expire from the source queue, they are automatically moved to the DLQ instead of being deleted, preventing data loss and allowing for later inspection and reprocessing. Increasing the visibility timeout only prevents other consumers from processing a message while it's being processed by one consumer, but doesn't prevent expiration. Using a delay queue delays initial delivery, which isn't the core problem here. Reducing message processing time is a good practice but doesn't directly solve the issue of the application being down.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed