A retail platform uses an Amazon SNS topic to publish order transaction events. Two backend applications consume these events via individual Amazon SQS standard queues subscribed to the SNS topic. The first application, the Inventory Service, requires up to seconds to process a single transaction message. However, the developer notices that the Inventory Service is processing the same messages multiple times. The queue's default Visibility Timeout is set to seconds. The second application, the High-Value Alert Service, should only process transaction messages where the order total is greater than . Which two configuration changes should the developer implement to resolve these issues? (Select TWO.)
- Set the Visibility Timeout of the Inventory Service's SQS queue to seconds.Cevap
- Configure a subscription filter policy on the Amazon SNS subscription for the High-Value Alert Service's queue to filter based on the order total attribute.Cevap
- CEnable message deduplication using a content-based deduplication ID on the Inventory Service's SQS standard queue.
- DIncrease the execution timeout of the Inventory Service's consumer application to exceed the message processing duration without modifying the queue configuration.
- EHardcode the IAM Access Key ID and Secret Access Key inside the Inventory Service's code to eliminate credential retrieval latency.
Cevap
Configure the Inventory Service's SQS queue Visibility Timeout to seconds, and configure an SNS subscription filter policy on the High-Value Alert Service's queue subscription to filter messages based on the order total.
Setting the visibility timeout to seconds ensures that the Inventory Service has enough time (up to seconds) to process and delete the message before it becomes visible to other consumers. Configuring an SNS subscription filter policy ensures that only order events exceeding are delivered to the High-Value Alert Service's queue.
Adım Adım Çözüm
Anahtar Kavram
Decoupled architecture message routing and visibility control using SQS Visibility Timeout and SNS Subscription Filter Policies.
Tahmini Süre:2m 0s