Composed Message Processor

Pattern Catalog

Previous Previous   Next Next

Site Home • Patterns Home • Table of Contents

The order-processing example presented in the Content-Based Router and Splitter patterns processes an incoming order consisting of individual line items. Each line item requires an inventory check with the respective inventory system. After all items have been verified we want to pass the validated order message to the next processing step.

How can you maintain the overall message flow when processing a message consisting of multiple elements, each of which may require different processing?

Use Composed Message Processor to process a composite message. The Composed Message Processor splits the message up, routes the sub-messages to the appropriate destinations and re-aggregates the responses back into a single message.

The Composed Message Processor uses an Aggregator to reconcile the requests that were dispatched to the multiple inventory systems. Each processing unit sends a response message to the aggregator stating the inventory on hand for the specified item. The Aggregator collects the individual responses and processes them based on a predefined algorithm as described under Aggregator.

...

Related patterns: Aggregator, Content-Based Router, Pipes and Filters, Splitter


Discuss this pattern on the Wiki. The Wiki allows you to add comments / suggestions for each pattern and even to add new pages. Simply follow this link and click "Edit" at the bottom of the window.   [How to use a Wiki.]  [EAI Patterns Wiki Home Page]

For a full description of the pattern see:

Enterprise Integration PatternsEnterprise Integration Patterns
Gregor Hohpe and Bobby Woolf
ISBN 0321200683
650 pages
Addison-Wesley


Home • Patterns • Table of ContentsPrevious Previous   Next Next