Thinking a bit more about my last post, I’d come to the conclusion that unless there is a really good excuse, one should always submit items to Amazon’s Simple Queue Service (SQS) via publishing to a topic in Simple Notification Service (SNS).
In the simplest case, you’ll publish to a topic and that topic will have a single subscriber that will post the message to the queue.
However, since SNS allows multiple subscribers you can get a couple of features free of charge without changing a single line of code. For example you can:
- Add a temporarily an Email address to get messages going to the queue via Email for easy debugging (you can easily and quickly unsubscribe via the link at the end of the Email)
- Add additional logging by adding an HTTP/S subscriber, getting the message and perform some logging on it
- Notify other monitoring systems that a certain process has started