Understanding the requirements of a messaging system
Broadly, there are two ways messaging systems work—synchronously and asynchronously. We'll talk about these two types of systems in a minute, but first, let's understand the requirements of a cloud-native messaging system as this will help us narrow down the hundreds of ways a messaging system can be configured.
Requirement #1: Scalability
The first requirement is that it needs to be scalable. One of the main reasons you're choosing to create a cloud-native application is because you know your application's demand will grow, and when it does, you need to be able to quickly and efficiently scale. Take, for instance, the architecture depicted in Figure 6.1. Let's say we're building a simple e-commerce application that has four microservices taking care of some of the core functions of your e-commerce business. As soon as a payment is confirmed, a message is sent to the packaging microservice...