In this section, you will verify the second distribution branch of the Fan-Out pattern: the Amazon SQS (BaristaQueue). You will poll for messages, inspect the message content (Body) and metadata attributes (Message Attributes). Additionally, you will verify that the VIPExpressQueue received zero messages thanks to SNS attribute-based filtering, before cleaning up the queue in preparation for the next hands-on lab.
BaristaQueue)BaristaQueue. You will notice that the Messages available column has incremented to the number of times you published an event (if you published once, the value will be = 1).



sns:Publish:
drink: String (Vietnamese Iced Latte)size: String (M)quantity: Number (1)is_vip: String (false)


VIPExpressQueue Did NOT Receive the MessageVIPExpressQueue.0.

Why was the message not delivered to VIPExpressQueue?
The VIPExpressQueue subscription is configured with a filter policy: quantity >= 5. Because our order had a quantity of quantity = 1, Amazon SNS automatically evaluated the message attributes and suppressed delivery to this queue. This optimizes compute resources, avoiding unnecessary processing overhead for VIP worker processes!
BaristaQueue Queue and click the Purge button on the details page to clear all test messages.

Through the exercises above, you have successfully verified the Fan-Out messaging pattern:
BaristaQueue.VIPExpressQueue was intelligently bypassed thanks to Amazon SNS attribute-based filter policies.