July 2017
Beginner to intermediate
340 pages
7h 43m
English
The previous pattern has workers that handle specific topics of messages, and the messages consumed by a worker are completely gone from the queue. We even added code to acknowledge that the message was consumed.
When you want a message to be published to several workers, the Publish/Subscribe (pubsub) pattern needs to be used.
This pattern is the basis for building a general event system and is implemented exactly like the previous one where there is one exchange and several queues. The difference is that the exchange part has a fanout ;type.
In that setup, every queue that you bind to a fanout exchange will receive the same message.
With a pubsub in place, you can broadcast messages to all your microservices if you need ...