Soru

Zorluk: ZorMessage-Based Integration using Amazon SQS and SNS

A developer is designing a transaction auditing system for a financial application. The system must process transaction events generated by upstream microservices. The requirements are:

* Transaction events for each customer must be processed in the exact order they occurred.
* Events must be sent to two different backend systems: an auditing service and a compliance archiving service.
* If the auditing service fails to process an event after three attempts, that specific event must be isolated for manual inspection without permanently blocking subsequent transactions for that customer.
* Duplicate events sent within 5 minutes must be automatically discarded.

Which combination of actions should the developer take to meet these requirements? (Select TWO.)

  1. Publish transaction events to an Amazon SNS FIFO topic, and subscribe two Amazon SQS FIFO queues to the topic, with one queue for each backend service.Cevap
  2. Configure a Dead-Letter Queue (DLQ) on the auditing SQS FIFO queue with a redrive policy where maxReceiveCount is set to 3, and ensure a unique Transaction ID is used as the Message Deduplication ID.Cevap
  3. C
    Publish transaction events to an Amazon SNS Standard topic, and subscribe two Amazon SQS FIFO queues to the topic using the customer ID as the Message Group ID.
  4. D
    Configure a Dead-Letter Queue (DLQ) directly on the Amazon SNS FIFO topic with a redrive policy, and set the visibility timeout on the SQS queues to at least three times the processing time.
  5. E
    Use Amazon Kinesis Data Streams with two shards to split the traffic between the auditing and compliance services, and configure the partition key based on the customer ID.

Cevap

Publish transaction events to an Amazon SNS FIFO topic, subscribe two Amazon SQS FIFO queues to the topic (one for each backend service), configure a Dead-Letter Queue (DLQ) on the auditing SQS FIFO queue with a maxReceiveCount of 3, and use the Transaction ID as the Message Deduplication ID.
To satisfy both ordering and fan-out, the developer must publish messages to an Amazon SNS FIFO topic and subscribe two separate Amazon SQS FIFO queues (one for each microservice). To handle failures without permanently blocking the message group, a Dead-Letter Queue (DLQ) must be configured on the SQS FIFO queue with a redrive policy (maxReceiveCount of 3). Furthermore, to deduplicate events within a 5-minute window, the Transaction ID should be passed as the Message Deduplication ID to the SQS FIFO queues.

Adım Adım Çözüm

1
Select the messaging pattern for fan-out and ordering.
Combine Amazon SNS FIFO and Amazon SQS FIFO queues.
SNS FIFO allows message fan-out to multiple endpoints, while SQS FIFO queues preserve the strict order of messages within each Message Group ID (using Customer ID).
2
Address the 5-minute deduplication requirement.
Use the Transaction ID as the Message Deduplication ID.
Amazon SQS FIFO queues natively deduplicate messages within a 5-minute window based on the Message Deduplication ID.
3
Address the message-level failure isolation requirement.
Configure a Dead-Letter Queue (DLQ) on the SQS FIFO queue with a maxReceiveCount of 3.
When a consumer fails to process a message, returning it to the queue blocks the Message Group. Setting a DLQ with a maxReceiveCount of 3 moves the message to the DLQ after 3 failed attempts, which unblocks the rest of the customer's messages.

Anahtar Kavram

Decoupled fan-out architectures requiring strict message ordering, deduplication, and fault isolation using Amazon SNS FIFO topics and Amazon SQS FIFO queues.
Tahmini Süre:2m 30s
Bu soruyu puanla