This is another pattern in enterprise integration patterns. The concept is quite simple but the implementation has lots of complexities. Lets see. Message router just adds another filter in the chain which is responsible for reading the common header data for a message and route it to a specific receiver application based on the result.
Now the concept looks very simple isn’t it! We can all read the message header and put some logic in any programming language and send resend it to another receiver application.
Actually, Message router implementation depend on various factors:
1. Content Based Routing
This is very basic form of routing. The filter in the chain reads the content of the message [only agreed header information as information is everything as of now] and decides based on pre-determined logic as to who should be the intended receipt of this message. Putting around a static implementation looks good to go of an idea but coming up with a configurable application which can do this is a real piece of work and would require lot of innovative thinking.
2. Scatter and Gather Message Routing
This is also one of my Fav! This looks at the requests inside a message and then scatter the request to multiple receiver applications to perform the operation. Once they are done with the request, the filter gathers all the response and send then collated to the sender application. This is also quite heck of a job to come up with the architecture and implementation of it.
3. Recipients list Routing
This is very similar to our email in outlook. We type who all the message should go and then the outlook application just sends it all the ones marked.
4. Split Routing
This along with Scatter and Gather pattern are used most often in today’s integration world. Most application integrating with each other differ in term how to interpret the data. Some interpret in bulk and some in single unit of data. Splitting the data and sending it to one system and gathering the data and sending it back to the sender application is what works today! There are many middle ware applications that support this but I still think that there is lot to be done.
All the above patters are supported by one or the other middleware platforms but there is lot more to do in this world of the Enterprise integration as more and more complex systems try to integration to either simpler or complex systems.
Hope you like the write!