DOP-C02 Question 304
Single answerYour team is building a real-time analytics platform for processing customer orders. The architecture requires the events from an order processing system to be processed by multiple downstream services simultaneously, such as a billing service, a notification service, and a machine learning service for fraud detection. Each service must process the events independently and at its own pace. Which AWS service or combination of services would best enable this fan-out pattern?
- A
Amazon SNS with multiple Amazon SQS queues subscribed to the topic
- B
Amazon Kinesis Data Streams with multiple consumers
- C
Amazon S3 Event Notifications with Lambda functions for each downstream service
- D
Amazon MQ for message fan-out to multiple consumers
Show answer and explanation
Correct answer: A
Explanation
The best solution for implementing a fan-out pattern in AWS is to use Amazon SNS in combination with multiple Amazon SQS queues. SNS allows for the publication of messages to a topic, and each subscribed SQS queue can independently receive and process the message. This approach provides scalability, decoupling, and fault tolerance, making it ideal for event-driven architectures where multiple downstream services need to process the same event at their own pace.
- A. Correct.
Correct. Amazon SNS with multiple Amazon SQS queues allows you to implement a fan-out pattern where a single event is published to an SNS topic, and each subscribed SQS queue can independently receive and process the event. This meets the requirement for independent processing by downstream services.
- B. Incorrect.
Incorrect. While Amazon Kinesis Data Streams can support multiple consumers, it is more suited for real-time streaming data where consumers are consuming from a shared stream. It does not inherently support the fan-out pattern as effectively as SNS and SQS for this scenario.
- C. Incorrect.
Incorrect. Amazon S3 Event Notifications are specific to S3 bucket events and are not designed for generic event-driven architectures. This option does not fit the described use case.
- D. Incorrect.
Incorrect. While Amazon MQ supports message brokering and multiple consumers, it is typically used for traditional message queuing scenarios and lacks the scalability and simplicity of the SNS-SQS combination for event fan-out.