WebSphere Message Broker, Version 8.0.0.7
Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS
See information about the latest product version
See information about the latest product version
Copying and modifying a message by using a JavaCompute node
You can use the Modify Message Class template in the JavaCompute node wizard to generate a copied or modified version of an input message
The incoming message and message
assembly are read-only. To modify a message, a copy of the incoming
message must be made. The Modifying Message Class template
in the JavaCompute node
wizard generates this copy. In the template code, the copy constructor
of MBMessage is called to create a message that
is populated by copying the input, as shown in the following Java™ code:
MbMessage outMessage = new MbMessage(inAssembly.getMessage());
MbMessageAssembly outAssembly = new MbMessageAssembly(inAssembly, outMessage);
The
new outAssembly, outMessage objects, or both, can now be modified
and propagated to the next node.