Soru

Zorluk: ZorDecoupling Architectures and Event-Driven Messaging

A logistics company is designing an event-driven delivery tracking system. Status updates for each delivery package must be processed in the exact chronological order in which they are generated by drivers. The updates need to be delivered to two separate systems: an analytics dashboard that requires strict ordering of events per package, and an audit service that does not require ordered processing. The solution must scale to handle traffic spikes during peak hours without losing any updates.

Which combination of actions should a solutions architect take to meet these requirements? (Select TWO.)

  1. Create an Amazon SNS FIFO topic to receive the updates, and subscribe an Amazon SQS FIFO queue to the topic for the analytics dashboard.Cevap
  2. Subscribe an Amazon SQS Standard queue to the Amazon SNS FIFO topic for the audit service.Cevap
  3. C
    Create an Amazon SNS Standard topic to receive the updates, and subscribe Amazon SQS FIFO queues to the topic for both the analytics dashboard and the audit service.
  4. D
    Create an Amazon SQS Standard queue to receive the updates, and configure both the analytics dashboard and the audit service to consume messages from the same queue.

Cevap

Create an Amazon SNS FIFO topic and subscribe an Amazon SQS FIFO queue to it for the ordered analytics dashboard, and subscribe an Amazon SQS Standard queue to the same SNS FIFO topic for the unordered audit service.
To preserve message ordering during a fan-out pattern, an Amazon SNS FIFO topic must be used. SQS FIFO queues can be subscribed to the SNS FIFO topic to receive messages in chronological order, satisfying the requirements of the analytics dashboard. SQS Standard queues can also be subscribed to the same SNS FIFO topic, which satisfies the audit service's requirement since it does not need ordered processing.

Adım Adım Çözüm

1
Identify the ordering requirements and fan-out architecture.
The analytics dashboard requires strict chronological order per package, while the audit service can process updates out of order. Both must receive all updates, necessitating a fan-out pattern.
This establishes that we need a messaging service capable of fan-out (such as Amazon SNS) combined with queuing (Amazon SQS) to decouple the publishers and subscribers.
2
Select the appropriate Amazon SNS topic type.
Choose Amazon SNS FIFO because it guarantees message ordering and deduplication, and supports delivering to SQS FIFO queues.
Standard SNS topics do not guarantee ordering and cannot deliver to SQS FIFO queues.
3
Select and subscribe the queues for each consumer.
Subscribe an Amazon SQS FIFO queue to the SNS FIFO topic for the ordered analytics dashboard. Subscribe an Amazon SQS Standard queue to the same SNS FIFO topic for the unordered audit service.
This setup preserves ordering for the dashboard through the end-to-end FIFO path while allowing the audit service to consume messages using a standard queue, since ordering is not required for auditing.

Anahtar Kavram

FIFO Fan-out using SNS FIFO and SQS FIFO/Standard
Bu soruyu puanla