Troubleshooting and Optimization
An SNS topic publishes events with an eventType message attribute to an SQS subscription. Its consumer discards everything except refund events; how should the developer reduce unnecessary deliveries?
Show the answer
Correct answerC. Configure a subscription filter policy for refund events
AWhy not this: Visibility timeout changes how long received messages remain hidden, not which events SNS delivers.
BWhy not this: A delivery retry policy controls retries after delivery failures, not event selection.
CWhy this is right: A filter policy lets SNS deliver only events whose attributes match the subscription's criteria.
DWhy not this: Receive wait time controls long polling; unwanted events would still enter the queue.
An SNS subscription filter policy can match the eventType attribute so that only refund events reach the queue. SQS long polling reduces empty receives, not deliveries of unwanted events.