Before publishing beverage order events from the web application, we need to prepare the consumer endpoints (subscribers). In this section, you will subscribe your personal email address to the CoffeeOrders topic on Amazon SNS, confirm subscription permissions, and inspect the pre-configured Amazon SQS queues along with the error message isolation. Dead-Letter Queue (DLQ) created by CloudFormation.
CoffeeOrders TopicCoffeeOrders topic.



You should use an active email address that you frequently check to easily track progress.
Pending confirmation.




Confirmed.
CoffeeOrders topic details page, observe the Subscriptions table:
You will see three subscriber endpoints:
BaristaQueue: An unfiltered SQS queue subscription — receives all orders to serve the kitchen brewing station.VIPExpressQueue: An SQS queue subscription with attribute filter policy: quantity >= 5.

BaristaQueue queue.arn:aws:sqs:...:BaristaDLQ3


Dead-Letter Queue (DLQ) Protection Mechanism:
If an order message is malformed (e.g., corrupt JSON format or invalid product code) causing the consumer worker process to crash, Amazon SQS will retry up to 3 times. If processing still fails, SQS automatically isolates this poison message into BaristaDLQ. As a result, all healthy orders behind it continue to be processed without blocking (preventing Head-of-Line Blocking)!