Extending the Large Messaging sample

The Large Messaging sample provides one example of how a large message with multiple occurrences of a repeating structure can be processed to extract the individual instances. Each of the instances of the SaleList structure were written as individual WebSphere MQ messages.  This resulted in the generation of many output messages from a single input message.

The sample also showed a technique that can be used to minimize virtual memory requirements for message flows that process large messages.  Although this technique is used in a sample that uses a repeating structure its use is not limited to these cases.  It can be used with any type of structure.  The message tree must be mutable though.

There are a number of ways to reuse or extended the logic in the sample to perform other types of processing. Some examples are:

These are discussed in more detail below.

Different message formats

In the sample the input and output message formats were self-defining XML. This same processing approach would work with either CWF or TDS message formats for the input or output messages. Similarly the same processing technique would work equally as well with a different structure. You would need to change the ESQL in the message flow to take account of a different message structure.

Different types of processing

In the sample the processing consisted of splitting the single input message into multiple smaller messages. After an iteration of the structure had been obtained it was written as a WebSphere MQ message. It would be a simple matter to change this processing so that the data was processed in a different way. For example the contents of each iteration of the structure could be processed by a sales analysis routine written in ESQL or Java. Another approach might be to compress the data or extract key pieces of information from it for insertion into a database

Using the processing in other message flows

The processing in the compute node MessageWithRepeatingElements contains a number of useful ESQL processing techniques that could easily be applied to other situations with some modification into other messages flows.  Examples of reusable components are:

When making changes it is good practice to review all parameter settings on nodes to ensure that they are compatible with your requirements.

Back to sample home