Best Practice: Reducing memory usage with parsers and message trees
Messages are routed and transformed by message flows within IBM® Integration Bus. As a message passes through the message flow, it is manipulated by message processing nodes that are often implemented in ESQL (Extended Structured Query Language). The message is stored in memory in the form of a message tree, which is created from the input message bitstream and serialized into an output bitstream by a parser.

When you process small messages, for example messages that are a few kilobytes in size, only a small amount of memory is needed to fully parse the message.

However, when you process large messages, the amount of memory and processing time that is required to store the message tree can quickly increase. The inefficient use of parsers, using the wrong parser, or even parsing when you do not need to, can all increase the amount of memory that is used by the integration node.

If all your memory is being used by processing large messages, then there might not be enough to maintain your expected level of service.

This Best Practice document
The information in this best practice document sections share common approaches to solving common problems based on real customer environments. They do not provide a “one size fits all” solution. They assume that you have a basic understanding of IBM® Integration Bus. As technology evolves and improved functionality is added to the product, new recommendations and advice might be added to the information in these documents.

Brief introductory video

Topics covered
Parsers: Selecting the right parser for the job, Identifying problem message flows, Partial parsing, Opaque parsing, and Avoiding unnecessary parsing.

Message tree: Reducing the size of the tree, Message tree copying, References, and Message size vs message tree.

Handling large input messages: Large messages, Large output messages, and The Splitter pattern.

ESQL coding practices: Environment & local environment considerations, Using reference variables, Reduce statements with SELECT, and Database interaction.

How do I get this Best practice document?
Download the PDF from IBM’s FTP site: BestPractice02-ReduceMemory.pdf
View the topics in the IBM® Integration Bus Knowledge Center Reduce your memory usage with parsers and message trees

Join The Discussion
