Publish/subscribe messaging is a form of asynchronous
service-to-service communication.
▪ Any message published to a topic is immediately received
by all of the subscribers to the topic.
▪ Enable event-driven architectures, and decouple
applications to increase performance, reliability and scalability.
▪ Applications are decoupled into smaller, independent
building blocks that are easier to develop, deploy and
maintain.
▪ Publish/Subscribe (Pub/Sub) messaging provides instant
event notifications for these distributed applications.
▪ A message topic provides a lightweight mechanism to
broadcast asynchronous event notifications.
▪ All components that subscribe to the topic receive every
message, unless a message filtering policy is set by the
subscriber.
Benefits
● Adding new subscriber services very easily
● Increase flexible scalability
● Distribute received messages at scale
● Event-driven Microservices
Drawbacks
● Single Point of Failure - Message Broker
● Hard to Debugging
● Not Good for FIFO and exact-once requirements
can cause performance and scalability problems
https://solace.com/blog/publish-subscribe-messaging-pattern/