AWS Certified Solutions Architect Professional SAP-C02 Practice Question
A retail company is breaking up its monolithic e-commerce platform into microservices. The core OrderService publishes a JSON OrderCreated event containing full order details but does not add any message attributes.
Requirements
InventoryService, ShippingService, and several future services must receive all OrderCreated events.
AnalyticsService must receive only events whose orderTotal is greater than USD 500.
The OrderService must be completely isolated from the availability and performance of downstream services.
Future consumers may require filters that reference more than 10 different fields inside the JSON payload, and the company wants to avoid the 10-attribute and 5-key limits of Amazon SNS filter policies.
Each consumer needs its own buffer so that if it is unavailable, events are retained until it recovers.
Which solution best meets these requirements?
Have OrderService send a copy of the OrderCreated event directly to a separate Amazon SQS queue created for each downstream service.
Publish each OrderCreated event to an Amazon SNS topic. Subscribe a dedicated SQS queue for every downstream service and use an SNS subscription filter policy to ensure AnalyticsService receives only high-value orders.
Publish each OrderCreated event to an Amazon EventBridge custom event bus. Create one EventBridge rule per downstream service that applies the necessary content-based filter (orderTotal > 500 for AnalyticsService) and forwards the event to that service's dedicated Amazon SQS queue.
Expose REST endpoints on each downstream service and modify OrderService to make synchronous HTTPS calls to every endpoint when an order is created.
Publishing the OrderCreated event to an Amazon EventBridge custom event bus and creating an EventBridge rule for each consumer-each rule sending the event to that consumer's dedicated Amazon SQS queue-meets every stated requirement:
EventBridge completely decouples the producer from consumers; OrderService is unaware of targets.
EventBridge rules support complex content-based filtering on any field in the JSON payload, including numeric comparisons such as orderTotal > 500.
A separate SQS queue per consumer provides durable buffering; if a service is down, messages wait in its queue without impacting other services or the producer.
New consumers are added by creating another rule and queue; no change to OrderService code or the event schema is required.
Alternatives fail:
An SNS topic with subscription filter policies is limited to 10 message attributes (or 5 keys for body filtering) per filter. Meeting the "more than 10 fields" requirement would require additional topics, message attributes, or code changes, violating the constraints.
Having OrderService write directly to multiple SQS queues tightly couples the producer to consumers and requires code changes for every new service.
Synchronous REST calls couple availability and performance directly to OrderService and provide no buffering.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is Amazon EventBridge and how does it work?
Open an interactive chat with Bash
How does content-based filtering in EventBridge differ from Amazon SNS filter policies?
Open an interactive chat with Bash
Why is using Amazon SQS queues important for each downstream service?
Open an interactive chat with Bash
AWS Certified Solutions Architect Professional SAP-C02
Design for New Solutions
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access