Pattern: Splitter
Composite Message
Many messages passing through an integration solution consist of multiple elements. For example, an order placed by a customer consists of more than just a single line item. each line item may need to be handled by a different inventory system. Thus, we need to find an approach to process a complete order, but treat each order item contained in the order individually.
How can we process a message if it contains multiple elements, each of which may have to be processed in a different way?
To avoid sending the complete message multiple times we could split the original message into
as many messages as there are inventory systems. Each message would then contain only the line
items that can be handled by the specific system.
- Use a Splitter to break out the composite message into a series of individual messages, each containing data related to one item.
- Use a Splitter to break out the composite message into a series of individual messages, each containing data related to one item.
- Then use a Content-Based Router to route the individual messages to the proper destination
No comments:
Post a Comment