WebSphere Message Brokers
File: ac30430_
Writer: Catherine Tucker

Task topic

This build: July 31, 2007 21:20:15

Accessing the MQMD header using a JavaCompute node

WebSphere MQ, WebSphere MQ Everyplace, and SCADA messages include an MQMD header. You can use a JavaCompute node to refer to the fields within the MQMD, and to update them.

The following Java code shows how to add an MQMD header to your message:
public void addMqmd(MbMessage msg) throws MbException
{
	MbElement root = msg.getRootElement();

	// create a top level 'parser' element with parser class name
	MbElement mqmd = root.createElementAsFirstChild("MQHMD");

	// specify next parser in chain
	mqmd.createElementAsFirstChild(MbElement.TYPE_NAME_VALUE,
		"Format",
		"XMLNS");
}
Related concepts
Message flows overview
Message modeling
Related tasks
Designing a message flow
Defining message flow content
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:20:15

ac30430_ This topic's URL is: