Course menuSAP-C03

Exams / SAP-C03 / Event-driven messaging and cross-account event routing / Question 1

SAP-C03 practice question: Event-driven messaging and cross-account event routing

Architecture Design and Implementation Built for the Cloud A free question from our original SAP-C03 practice exam. Try it, then open the answer to see why each option is right or wrong.

Last verified against current AWS documentation ·How we write our questions

A logistics firm's warehouse management system sends a "parcel scanned" event each time a parcel passes a scanner, about 40,000 events an hour at peak. Three services consume every event: billing, customer notifications and an analytics loader.

Billing must process the events for each parcel in the order they were scanned. Every consumer must receive every event, and a message that a consumer cannot process after several tries must be set aside without stopping later events for that parcel.

The team wants no message broker to patch or size, and new consumers in other accounts must be added without changing the producer.

Which solution meets these requirements?

Choose one answer.

  1. A. Publish each event to one standard Amazon SQS queue that all three services poll, and give each service its own dead-letter queue for failed messages.
  2. B. Send each event to an Amazon EventBridge custom event bus with one rule for each consumer, and give every rule target its own retry policy and dead-letter queue. Consumers in other accounts receive events through cross-account rules.
  3. C. Publish each event to an Amazon SNS FIFO topic with one Amazon SQS FIFO queue per consumer, using the parcel ID as the message group ID. Each queue has a redrive policy to its own dead-letter queue, and new consumers simply subscribe to the topic.
  4. D. Run an Amazon MQ for ActiveMQ broker with a topic and one durable subscriber for each consumer, so every consumer receives every message in order, and use the broker's redelivery policy to move failed messages to a dead-letter queue.
Show the answer and explanation

Answer: C

  • A. Wrong: A standard queue does not keep order, and each message is received by only one poller. Each consumer would miss most of the events, so this breaks the requirement that every consumer receives every event.
  • B. Wrong: EventBridge fans out events well and supports per-target retries, so it covers the fan-out and dead-letter needs. It does not guarantee ordering per parcel, which billing depends on.
  • C. Right: Correct. SNS FIFO topics deliver to SQS FIFO queues, so each consumer gets every event, and the message group ID keeps each parcel's events in order. A poison message moves to the consumer's dead-letter queue after its redrive limit, and the new subscribers need no producer change.
  • D. Wrong: A durable subscriber in Amazon MQ meets the delivery and ordering needs, so the design is viable. It conflicts with the requirement for no broker to patch or size, which is why it is not the best fit.

Explanation

Fan-out, per-parcel ordering, isolated retries and dead-letter handling, and no broker to run all point to SNS FIFO feeding one SQS FIFO queue per consumer. A standard queue shares messages between consumers, EventBridge does not order events, and Amazon MQ adds broker operations.

SNS to SQS fan-out with one queue per consumer A producer publishes each event once to an SNS topic. The topic delivers a copy to three SQS queues, and each of three consumers reads its own queue. Producer SNS topic publish once SQS queue holds while down SQS queue holds while down SQS queue holds while down Consumer A Consumer B Consumer C
With SNS FIFO and SQS FIFO, each consumer gets its own ordered queue, and a new consumer just subscribes.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

Want more on Event-driven messaging and cross-account event routing? The 5 full-length practice sets have 6 more Event-driven messaging and cross-account event routing questions, 375 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets