SAA-C03 Question 140
Single answerA company is building a distributed application where multiple microservices need to communicate asynchronously. They require a fully managed messaging service that ensures messages are delivered at least once and can decouple the sending and receiving systems. Additionally, they want to implement a publish/subscribe pattern where multiple subscribers can receive the same message. Which AWS service should they use?
- A
Amazon SQS Standard Queue
- B
Amazon SQS FIFO Queue
- C
Amazon SNS
- D
Amazon MQ
Show answer and explanation
Correct answer: C
Explanation
Amazon SNS is the correct choice because it is designed for the publish/subscribe messaging pattern, allowing multiple subscribers to receive the same message. It decouples microservices effectively and ensures at-least-once delivery. Amazon SQS is better suited for point-to-point communication, and Amazon MQ is more appropriate for applications requiring traditional messaging protocols.
- A. Incorrect.
Amazon SQS Standard Queue is a queuing service designed for point-to-point communication, not a publish/subscribe model. While it ensures messages are delivered at least once, it does not meet the publish/subscribe requirement.
- B. Incorrect.
Amazon SQS FIFO Queue provides First-In-First-Out ordering and exactly-once processing but is also designed for point-to-point communication, not a publish/subscribe model.
- C. Correct.
Amazon SNS (Simple Notification Service) is ideal for the publish/subscribe messaging pattern. It allows messages to be published to a topic and delivered to multiple subscribers (such as SQS queues, Lambda functions, or HTTP endpoints). It also supports decoupling microservices and ensures at-least-once delivery.
- D. Incorrect.
Amazon MQ is a managed message broker service suitable for migrating applications using traditional messaging protocols. While it supports publish/subscribe, it is not the best choice for a fully managed, serverless architecture.