Pub/Sub messaging makes it easy for developers to build highly functional and architecturally complex applications in the cloud. With Pub/Sub, publishers and subscribers are decoupled and unaware of each other’s existence. Subscribers express interest in certain topics, and publishers send a message to a topic. The message will then be immediately delivered or pushed to all of the subscribers to the topic.
Amazon Simple Notification Service (SNS) makes it easy for you to build an application in this way. Below is a basic explanation of how the Publish Subscribe model works.
Pub/Sub messaging instantly pushes asynchronous event notifications when messages are published to the message topic. Subscribers are notified when a message is available.
In the Publish Subscribe model, topics can typically connect to multiple types of endpoints, such as message queues, serverless functions, HTTP servers, and email addresses. For example, Amazon SNS supports other protocols beside email, including HTTP, HTTPS, and Amazon SQS queues. For more information see the Developer Guide, or read our blogs, Invoking AWS Lambda Functions via Amazon SNS and Receiving Amazon SNS Messages in PHP.
This scenario happens when a message is sent to a topic and then replicated and pushed to multiple endpoints. Fanout provides asynchronous event notifications which in turn allows for parallel processing. For details on how to implement fanout with Amazon Simple Notification Service and Amazon Simple Queue Service, see the Developer Guide. You can also read our blogs, Subscribing Queues to Topics and Subscribing an SQS Queue to an SNS Topic.
This feature empowers the subscriber to create a message filtering policy, so that it will only get the notifications it is interested in, as opposed to receiving every single message posted to the topic. For information on how to use filtering with Amazon SNS, see our blogs: Simplify Your Pub/Sub Messaging with Amazon SNS Message Filtering and Message Filtering Operators for Numeric Matching, Prefix Matching, and Blacklisting in Amazon SNS.
Message topics authenticate applications that try to publish content, and allow you to use encrypted endpoints to encrypt messages in transit over the network.
Get started for free with just three simple commands.