SAA-C03 Question 262
Single answerA company is building a new event-driven application where multiple microservices need to process and respond to events in near real-time. The solution must ensure that each microservice receives all the events it is subscribed to, and there is a need to decouple the components to improve scalability and fault tolerance. Which AWS service should the company use to meet these requirements?
- A
Amazon SQS
- B
Amazon SNS
- C
Amazon MQ
- D
Amazon Kinesis Data Streams
Show answer and explanation
Correct answer: B
Explanation
Amazon SNS is the best fit for this scenario because it is a highly scalable and fully managed publish/subscribe messaging service. It allows multiple microservices to subscribe to a topic and ensures that each subscriber receives all the events it is subscribed to. This makes it ideal for decoupling components in an event-driven architecture.
- A. Incorrect.
Amazon SQS is a message queueing service designed for point-to-point communication where messages are consumed by a single consumer. It does not support the publish/subscribe model required for this scenario.
- B. Correct.
Amazon SNS is a publish/subscribe messaging service that allows multiple subscribers to receive copies of the same message. It is ideal for decoupling microservices and ensuring all subscribed consumers receive the events, meeting the requirements of the scenario.
- C. Incorrect.
Amazon MQ is a managed message broker service that supports open-source message broker protocols. While it could potentially handle the publish/subscribe pattern, it is more complex to set up and manage compared to Amazon SNS, which is specifically designed for this use case.
- D. Incorrect.
Amazon Kinesis Data Streams is designed for real-time data streaming and processing. While it can distribute data to multiple consumers, it is not a publish/subscribe messaging service like Amazon SNS. It is better suited for streaming use cases rather than decoupling microservices in an event-driven architecture.