The company's technology platform in the docking of IBM MQ message middleware with a broker, messages sent to MQ have more message header information:RHF2, resulting in the reception of the message is not working properly. Record how this problem is handled here.
A parameter, targetclient, is provided in IBM MQ that can be used to control whether the message header is enabled in a JMS message. When using JMS as the client for IBM MQ, add the parameter after the message destination (queue or subject name) in the format: topic:///{ target name }?targetclient=1
targetclient=1 When: The message does not include RHF2 message header; targetclient=0 or do not set this parameter: The message will include RHF2 the message header.
If you are creating a theme:
String str = "topic:///" + topic + "? targetclient=" + targetclient;
Topic topic= session. Createtopic (str);
*******************************************************************************
Bingjava
Copyright NOTICE: This article for Bo Master original article, reprint please indicate source: http://www.cnblogs.com/bingjava/p/5258274.html
*******************************************************************************
Processing of the RHF2 message header in the IBM MQ message middleware JMS message