Amazon SNS and Amazon SQS are key services to create loosely coupled, scalable, cloud-based, and serverless applications in the cloud. One of the common architecture concepts is fanout. In this concept, several Amazon SQSs act as a subscriber. A publisher sends a message to an SNS topic and it distributes this topic to many SQS queues in parallel. The diagram given in Figure 13.2 describes the concept of fanout in SQS. For example, a virtual, multinational, e-commerce company introduces hundreds of products for sale in many countries every day. Now, when a new product is saved in a web application, it will send a message to the SNS topic. Immediately, the SNS topic sends notifications in parallel to all subscriber SQS queues:
Let's explore a scenario to better understand this point.
Consider a scenario in which there is a...