Just as message queuing, pub-sub (publish-subscribe) pattern moves information from producer to a consumer. However the major difference here is this pattern allows multiple consumers to receive each message in a topic. It ensures that the consumer receives messages in a topic in exact same order in which it was received in the messaging system. This pattern can be better understood by taking a real life scenario. Consider a stock market. It is used by large number of people and applications, all of whom should be send messages real time and just the exact sequence of prices. There is a huge difference between a stock going up to down and stock going down to up. Lets see an example Apache Kafka is one of the ...
Introduction to pub/sub pattern
Get TypeScript Microservices now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.