Pub/Sub for inter-service messaging
Pub/Sub is a messaging service that works well with distributed applications and those using microservice architectures. Its key advantage is that it provides an asynchronous service that decouples message producers from message consumers.
Inter-process communication has been traditionally performed using remote procedure calls (RPCs) and similar synchronous systems. Pub/Sub offers an alternative based on asynchronous broadcasting, where event producers send a global message attached to a topic, and event consumers subscribe only to those topics that are of interest to them.
Each of the messages is indeed lent to all active subscribers until they are acknowledged by one of the consumers, indicating that it has been processed, after which they are removed from the queue.
Since a message can contain all kinds of information, this makes it possible to send data across processes and services using a scalable and asynchronous system. Services...