Soru

Zorluk: OrtaDecoupling Architectures and Event-Driven Messaging

A digital publishing company is building an automated newsletter system. When articles are published or updated, metadata events must be processed in sequence to update the search index and subscriber email caches. The publishing rate can spike dramatically during breaking news events, and downstream update workers sometimes experience transient database connection timeouts. The company needs a resilient, decoupled architecture that processes updates in the order they occur per article, buffers traffic spikes, and ensures that failing messages do not block the processing of other articles. Which TWO actions should the solutions architect take to meet these requirements? (Select TWO.)

  1. Send the article update events to an Amazon SQS FIFO queue, setting the article ID as the message group ID.Cevap
  2. Configure a dead-letter queue (DLQ) on the main Amazon SQS FIFO queue to capture messages that fail to process after the maximum receive count is exceeded.Cevap
  3. C
    Send the article update events to an Amazon SQS Standard queue and enable message deduplication using the MessageDeduplicationId parameter.
  4. D
    Send the article update events to an Amazon SQS Standard queue and configure a dead-letter queue (DLQ) to handle failed messages while ensuring ordered delivery by setting the visibility timeout to zero.

Cevap

To achieve decoupling, order preservation, and fault tolerance, the solution must use an Amazon SQS FIFO queue with the article ID as the MessageGroupId, combined with a Dead-Letter Queue (DLQ) to handle processing failures without blocking other articles.
To decouple the systems while maintaining strict order processing per article, a Solutions Architect should use an Amazon SQS FIFO (First-In-First-Out) queue. By setting the article ID as the MessageGroupId, SQS ensures that messages belonging to the same article are processed sequentially in the order they were received. Setting up a dead-letter queue (DLQ) ensures that poison-pill messages (those that fail repeatedly) are isolated after a specified number of attempts, allowing other messages in the queue to continue processing without blocking the pipeline.

Adım Adım Çözüm

1
Select the appropriate messaging service that supports ordering.
Amazon SQS FIFO queues are chosen over SQS Standard queues because they guarantee first-in, first-out ordering, which is required to process article updates in sequence.
Standard SQS queues only guarantee best-effort ordering, which does not satisfy the strict sequential requirement.
2
Configure the message grouping strategy.
Set the MessageGroupId to the article ID on every sent message.
Using the article ID as the MessageGroupId ensures that messages belonging to the same article are processed in order, while messages for different articles can be processed concurrently to improve throughput.
3
Address transient failures and blockages.
Configure a dead-letter queue (DLQ) to capture messages that exceed the maximum receive count.
If a message fails repeatedly (e.g., due to database timeouts), transferring it to a DLQ unblocks the message group, allowing subsequent updates for that article to proceed.

Anahtar Kavram

Decoupling message processing using SQS FIFO queues and MessageGroupIds to maintain ordering, combined with DLQs to handle poison-pill messages.
Bu soruyu puanla