Soru

Zorluk: OrtaDecoupling Architectures and Event-Driven Messaging

A financial technology company is designing a ledger application that processes account transaction logs. When an account transaction occurs, the details must be sent to two separate downstream systems: a ledger auditing service and an account balance update service. Both downstream systems must process the transaction events in the exact chronological order in which they were generated for each account to ensure ledger accuracy. The architecture must be decoupled and resilient to temporary downstream service outages. Which combination of steps should a solutions architect recommend to meet these requirements? (Select TWO.)

  1. Create an Amazon SNS FIFO topic to receive and distribute the transaction events.Cevap
  2. Create two Amazon SQS FIFO queues and subscribe them to the SNS FIFO topic, with one queue dedicated to each downstream service.Cevap
  3. C
    Create a standard Amazon SNS topic and subscribe two standard Amazon SQS queues to it to distribute the transaction events.
  4. D
    Create two standard Amazon SQS queues and configure the transaction generator to write to both queues simultaneously using parallel client-side threads.
  5. E
    Configure both downstream services to pull events from a single shared Amazon SQS FIFO queue.

Cevap

Creating an Amazon SNS FIFO topic to receive the events and subscribing two Amazon SQS FIFO queues to the topic (one for each downstream service) provides a decoupled, resilient, and ordered event distribution system.
To achieve both event fan-out (sending the same transaction to multiple services) and chronological ordering, the architecture must use Amazon SNS FIFO paired with Amazon SQS FIFO. An SNS FIFO topic preserves the ordering of messages and can fan them out to multiple SQS FIFO queues. Each downstream service must have its own dedicated SQS FIFO queue to ensure both services receive every transaction message independently without competing. The SQS queues also buffer messages, decoupling the producer from the consumers and ensuring resilience during downstream service outages.

Adım Adım Çözüm

1
Select a message distribution service that supports ordering and fan-out.
Amazon SNS FIFO is chosen because standard SNS does not guarantee ordering, which is a key requirement for ledger transactions.
An SNS FIFO topic ensures that message ordering is maintained and allows fanning out the same message to multiple subscriber queues.
2
Select consumer queues that support ordering and resilience.
Two Amazon SQS FIFO queues are chosen, with one dedicated to each downstream service.
SQS FIFO queues preserve the strict order of messages published by the SNS FIFO topic and buffer messages to protect downstream services during high traffic or downtime.
3
Verify fan-out topology versus shared queue topology.
Each service must have its own queue subscribed to the SNS FIFO topic rather than sharing a single queue.
A single shared queue would result in competing consumers where each transaction is processed by only one of the services instead of both.

Anahtar Kavram

Fanning out ordered messages to multiple downstream systems using Amazon SNS FIFO and Amazon SQS FIFO queues.
Bu soruyu puanla