SAA-C03 Question 142
Single answerA company is building a distributed application that requires real-time notifications to multiple subscribers whenever an event occurs. The application must decouple the message producers from the consumers and allow multiple subscribers to process the same message independently. Which AWS service combination best meets these requirements?
- A
Amazon SQS with long polling
- B
Amazon SNS with multiple subscriptions
- C
Amazon Kinesis Data Streams with consumers
- D
Amazon MQ with topic-based messaging
Show answer and explanation
Correct answer: B
Explanation
Amazon SNS is the best choice for a publish/subscribe model where multiple subscribers need to process the same message independently. It decouples message producers from consumers and allows for real-time notifications to multiple subscribers, which aligns perfectly with the given scenario.
- A. Incorrect.
Amazon SQS (Simple Queue Service) provides point-to-point messaging and is not ideal for a publish/subscribe model where multiple subscribers need to process the same message. It is a queueing service, not a pub/sub service.
- B. Correct.
Amazon SNS (Simple Notification Service) is designed for a publish/subscribe model. It allows message producers to publish messages to a topic, and multiple subscribers can independently process the same message by subscribing to the topic.
- C. Incorrect.
Amazon Kinesis Data Streams is designed for real-time data streaming and processing, but it does not inherently support a publish/subscribe model for notifications. It is better suited for processing large volumes of streaming data.
- D. Incorrect.
Amazon MQ is a managed message broker service that supports industry-standard messaging protocols, including topic-based messaging. However, it is more complex to set up and manage compared to the native publish/subscribe capabilities of Amazon SNS for this use case.