What is the publish/subscribe patroon?
By: Alexandra Benschop
Information exchange in the ESB exists in the form of messages. Messages go from application A to application B and vice versa. The publish / subscribe pattern is a way to exchange messages, without having to link applications point-to-point.
Another interesting article: What is an Enterprise Service Bus?
How does it work?
The sending application (application A) sends a message to a topic, which is kind of a starting point. The receiving application (application B) is, as it were, subscribed to this topic and receives the message on ‘its’ queue, a queue where the message stays on until the application processes the message. The message is first placed on the topic by the publisher (A), and then picked up again by the subscriber (B). This way, the senders and recipients of the message do not have to know anything about each other’s existence. The ESB ensures that systems are ‘loosely coupled’.
Filter and route
Multiple applications can communicate with the same application. In that case, there are multiple subscribers. Usually, subscribers do not receive all messages published by the publisher, but only those that are relevant to the subscriber. Here, filtering is involved. The publisher shares information with an unknown audience and every passerby who needs the message listens to it. Compare it to a Yes / No mailbox sticker. The recipient decides with the sticker: ‘I want to receive this mail, and not this mail.’ And the mailbox (the queue) ‘saves’ the mail until the owner empties it.
Figure 1: The publish/subscribe pattern
When you expand the IT landscape of your organization with a new application, you can set up this application as a subscriber and you do not have to change anything about the sending application. Your IT landscape remains flexible and scalable!
A flexible landscape with inQdo connect
inQdo connect, our ESB platform, is built according to our best practices. We also use the publish / subscribe design pattern and use the Canonical model for each interface. In this way we can easily indent (last-minute) changes when implementing inQdo connect with our customers and interfaces can be added without too many complexity.
How can we help you?
Our integration teams are ready to help you with all your integration questions. Need help with an issue? Feel free to contact us.