Question & Answer
Question
IBM Integration Bus (IIB) - Message Flow Programming Practices
Answer
On Demand Consulting
Author: Marilza Maia
IBM Integration Bus (IIB)
Message Flow Programming Practices
Author: Marilza Maia
IBM Integration Bus (IIB)
Message Flow Programming Practices
- XMLNSC is IBM strategic XML domain
- Use Reference Variables extensively. Declare REFERENCEs to avoid excess navigation of the Message Tree.
- Remove unnecessary processing (e.g. CopyMessageHeaders and CopyEntireMessage)
- Replace ELSEIF with CASE statement
- Combine adjacent Compute nodes. Avoid overuse of Compute nodes because tree copying is processor heavy
- Minimize the number of nodes in a message flow
- Put variables and constants at the broker schema level only when they need to be reused by multiple modules.
- Initialize variables within DECLARE statements especially EXTERNAL variables.
- Make code as concise as possible to restrict the number of statements. This will cut parsing overhead.
- Use LASTMOVE or CARDINALITY statements to check the existence of fields in the message tree. This would avoid mistakes.
- Avoid use of CARDINALITY statements inside loops.
- Avoid nested IF statements: use ELSEIF or CASE WHEN clauses to get quicker drop-out.
- Avoid overuse of string manipulation because it is processor heavy: use the REPLACE function in preference to a complete re-parsing.
- Do not use trace nodes in production environments. Using ${Root} expression is expensive operation as this causes the complete message tree parsing. This is not as serious an issue as in the past as in version 7.0 the ability to override the trace nodes in the bar file during deployment allows the ability to dynamically turn on the trace nodes should a problem develop. An alternative is to use the Log4J Node that will let Java node determine whether to post a message before formatting.
- Avoid using Reset Content Descriptor nodes. An RCD node is intended to change the message domain which actually parses the complete message tree. This is both memory and CPU intensive activity.
- A logical combination of IF statements "CREATE with PARSE" statement and ESQL ASBITSTREAM can be used to eliminate RCD nodes and multiple compute/filter nodes.
- Save intermediate results in the message tree in order to avoid recalculating them in subsequent nodes. If the message contains user maintainable data folders in the headers like MQRFH2 usr folder then store the intermediate results in it for subsequent nodes.
- Use message flows only for performing mediation activities like transformation translation protocol conversion message enrichment and routing. Message flows should be stateless engines in the mediation activities.
- Consider the use of Patterns. Patterns provide top-down parameterized connectivity of common use cases e.g. Web Service facades Message oriented processing Queue to File. Patterns helps describe best practice for efficient message flows it's quick to write and less prone to errors. Users can write your own patterns too. Lastly Patterns help new message flow developers come on board more quickly. See http://www.ibm.com/developerworks/webservices/library/ws-enterpriseconnectivitypatterns/index.html
- Read WebSphere Message Broker development and deployment best practices http://www.ibm.com/developerworks/websphere/library/techarticles/0809_kudikala/0809_kudikala.html
- Read ESQL code conventions in WebSphere Message Broker - http://www.ibm.com/developerworks/websphere/library/techarticles/0803_shen/0803_shen.html
[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSQTW3","label":"IBM On Demand Consulting for Hybrid Cloud"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"","label":""}}]
Was this topic helpful?
Document Information
More support for:
IBM On Demand Consulting for Hybrid Cloud
Software version:
All Versions
Document number:
771811
Modified date:
20 February 2019
UID
ibm10771811
Manage My Notification Subscriptions