This week, we’ll study yet another variation of Message Router known as Recipient List.
When do I use this pattern?
A Recipient List is used when the input message needs to be sent to multiple receivers based on a condition. For example, in the Dynamic Router blog, different types of IDocs were routed to different integration flows based on their IDoc Type. Now, based on the IDoc type, the message could be sent to multiple receivers.
Recipient List in CPI
In the second part of this integration, individual IDoc of a given IDoc Type is handled. Here, we can send a single IDoc to multiple parties. For example, consider that Customer Master information is required in Customer Relationship Management software as well as the Order Management System.
Here, Parallel Multicast component is used to send customer master information to CRM and OMS simultaneously.
In this implementation, the receivers have been determined based on the Data Type. The Data Type is determined dynamically, however, the receivers have to be hard-coded in the second flow. For a completely dynamic implementation of Recipient List, refer to Alex‘s blog on Recipient List.
Recipient List is used when multiple receivers need to receive a copy of a single message based on a condition. In CPI, Recipient List can be implemented using a combination of a Router and a Parallel Multicast.
- Recipient List Pattern in Enterprise Integration Patterns
- Alex‘s blog on Recipient List
- CPI Components
Hope this helps,