I was looking for a lightweight replacement for JMS (Java Messaging Service) and wanted to avoid deploying ActiveMQ or another Java JMS service/product.
Amazon SQS is a good alternative for JMS Queues - and there is also an equivalet to JMS Topics and Subscriptions using AWS SNS.
Here is what you do:
- Create a SNS Topic
- Create a SQS Queue
- Subscribe to the SNS Topic as "sqs"
- Set the Permissions of the SQS Queue to receive SNS notifications
- Publish to the SQS topic
Here the Java code snipets - other than #4 are pretty obvious.