Message Splitter for WebSphere MQ: one-way (for XML) pattern

Use the Message Splitter for WebSphere MQ: one-way (for XML) pattern to split a large XML message into smaller elements for processing by one or more targets, by using transactional flows and persistent WebSphere MQ messages.

Use this pattern when you have applications that store information about a number of business transactions and transmit this information to one or more target applications in batches. It can be used to handle large messages without excessive memory use.

This pattern can be used when either the source application or target applications cannot make or process near real-time service calls, or when batching of information is required for business reasons.

A diagram showing the behavior of the pattern. XML messages are split into smaller elements for processing by one or more targets.

Solution

The solution is to implement a message flow that uses a mutable message tree so that repeatable elements can be deleted as they are processed. Partial parsing enables single elements to be parsed as required and, because these elements are deleted on completion, the in-memory tree is prevented from growing linearly with the number of elements. As each element is extracted it is routed to the appropriate target application.

Request flow
Route subflow
Error subflow
Log subflow

Related tasks

Read the following section for information about how to apply and use this pattern.

Constraints on the use of the pattern
Tasks to complete before applying the pattern
Parameters for the pattern
Tasks to complete after generating the pattern