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

Accessing the MQMD header by using a JavaCompute node

WebSphere® MQ and WebSphere MQ Everyplace® messages include an MQMD header. You can use a JavaCompute node to refer to the fields in 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");
}
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2016Copyright IBM Corporation 1999, 2016.

        
        Last updated:
        
        Last updated: 2016-05-23 14:46:15


Task topicTask topic | Version 8.0.0.7 | ac30430_