Objective of this blog to introduce to Publish & Subscribe pattern integration pattern.
Like any integration pattern we have two entities (from and to)
Can you guess which is the third important entity in this model?
Yes, its the Broker. Its a layer (software component) sitting between publisher and subscriber and managing both's needs. It lets publisher continue to publish as and when they wish. On subscriber side it allows preference, what they want to subscribe, at what frequency, etc.
In this interaction a key concept used is Topic. Broker creates various Topics (stored in a hierarchical structure). A publisher knows to which topic he is publishing and similar subscriber knows which topic he is subscribing to. In this way a level of abstraction happens between publisher and subscriber, both so not need to know each other and sit loosely coupled.
There are many broker solution available to achieve this. Will not cover all of that, but would mention this integration pattern is also the foundation of event driven architecture style. You need to look at publish as event publishing and subscriber are application who are interest in responding to that event. This architectural style is very popular in building large scale systems.
You may be interested in:
(1) Various products available in market that support Pub-Sub pattern?
(2) What is event driven architecture?
(3) How is topic structured and what is topic string? How it beings flexibility?
Will end by saying "The first newspaper was published in 1631 in France, so the concept is now new"
Happy Learning!
Like any integration pattern we have two entities (from and to)
- Publish - we all know is to print/write/produce something at defined or irregular frequency without much worrying who actually is using it, say a monthly magazine.
- And a subscriber is one who wants to get a copy of published item, as they are produced or say at a frequency of their own choice.
Can you guess which is the third important entity in this model?
Yes, its the Broker. Its a layer (software component) sitting between publisher and subscriber and managing both's needs. It lets publisher continue to publish as and when they wish. On subscriber side it allows preference, what they want to subscribe, at what frequency, etc.
In this interaction a key concept used is Topic. Broker creates various Topics (stored in a hierarchical structure). A publisher knows to which topic he is publishing and similar subscriber knows which topic he is subscribing to. In this way a level of abstraction happens between publisher and subscriber, both so not need to know each other and sit loosely coupled.
There are many broker solution available to achieve this. Will not cover all of that, but would mention this integration pattern is also the foundation of event driven architecture style. You need to look at publish as event publishing and subscriber are application who are interest in responding to that event. This architectural style is very popular in building large scale systems.
You may be interested in:
(1) Various products available in market that support Pub-Sub pattern?
(2) What is event driven architecture?
(3) How is topic structured and what is topic string? How it beings flexibility?
Will end by saying "The first newspaper was published in 1631 in France, so the concept is now new"
Happy Learning!
0 comments:
Post a Comment