This week, we’ll study a routing pattern known as Message Broker.
When do I use this pattern?
Other routing patterns tell us different ways of routing a message from a sender system to receiver system(s). Message Broker Pattern tells us how to structure the routers themselves.
For example, when designing a middleware system, it is possible that a Recipient List pattern is applied for sending Customer and Material data to multiple receivers. However, some receivers require specific type of materials, therefore, a Message Filter is used.
In this case, a central routing component could be built that will first use a Content-based Router to differentiate between Customers and Materials. Then, if the message is a Material message, the message will pass through a Message Filter where unnecessary Material messages will be dropped. Finally, Recipient List is used to route the message to multiple receivers.
Message Broker in CPI
In EIPinCPI blog series, we have discussed the routing patterns and their implementation in CPI. Message Broker pattern only requires combining the various implementations into a single central component.
A Message Broker provides central control over all the routing logic in a middleware system. In CPI, a combination of patterns can be used to implement a Message Broker.
- Message Broker Pattern in Enterprise Integration Patterns
- Routing Patterns studied in EIPinCPI
Hope this helps,