nerdexam
Amazon

DEA-C01 · Question #135

An application consumes messages from an Amazon Simple Queue Service (Amazon SQS) queue. The application experiences occasional downtime. As a result of the downtime, messages within the queue…

The correct answer is A. Increase the message retention period C. Attach a dead-letter queue (DLQ) to the SQS queue. To minimize data loss from an SQS queue when an application experiences downtime, the message retention period should be extended, and a dead-letter queue should be attached.

Data Store Management

Question

An application consumes messages from an Amazon Simple Queue Service (Amazon SQS) queue. The application experiences occasional downtime. As a result of the downtime, messages within the queue expire and are deleted after 1 day. The message deletions cause data loss for the application. Which solutions will minimize data loss for the application? (Choose two.)

Options

  • AIncrease the message retention period
  • BIncrease the visibility timeout.
  • CAttach a dead-letter queue (DLQ) to the SQS queue.
  • DUse a delay queue to delay message delivery
  • EReduce message processing time.

How the community answered

(33 responses)
  • A
    85% (28)
  • B
    3% (1)
  • D
    9% (3)
  • E
    3% (1)

Why each option

To minimize data loss from an SQS queue when an application experiences downtime, the message retention period should be extended, and a dead-letter queue should be attached.

AIncrease the message retention periodCorrect

Increasing the message retention period (up to 14 days) allows messages to remain in the queue for a longer duration, providing more time for the application to recover from downtime and process them before they are automatically deleted.

BIncrease the visibility timeout.

Increasing the visibility timeout only prevents other consumers from processing a message while it is being processed; it does not prevent messages from expiring and being deleted from the queue if the consumer application remains down.

CAttach a dead-letter queue (DLQ) to the SQS queue.Correct

Attaching a dead-letter queue (DLQ) ensures that messages that fail to be processed successfully after a specified number of receive attempts are moved to the DLQ instead of being discarded, preventing data loss and allowing for later analysis or reprocessing.

DUse a delay queue to delay message delivery

Using a delay queue only delays the initial availability of a message in the queue; it does not address the issue of data loss due to messages expiring if the application is down or fails to process them.

EReduce message processing time.

Reducing message processing time helps improve throughput and responsiveness but does not directly prevent data loss caused by messages expiring during extended application downtime.

Concept tested: SQS message retention and dead-letter queues

Source: https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html

Topics

#SQS#Message Retention#Dead-Letter Queue#Data Durability

Community Discussion

No community discussion yet for this question.

Full DEA-C01 Practice