Processing of RHF2 message headers in ibm mq message middleware jms messages, mqrhf2
When the company's technical platform is connected to a brokerage with ibm mq message middleware, the message header information is added to the message sent to MQ: RHF2, resulting in abnormal message receiving and processing. Record how the problem is handled here.
The targetClient parameter is provided in ibm mq to control whether the message header is enabled in jms messages. When using jms as the client of ibm mq, you can add this parameter after the message target (queue name or topic name) in the format of topic: // {target name }? TargetClient = 1
If targetClient is set to 1, the RHF2 message header is not included in the message. If targetClient is set to 0 or this parameter is not set, the RHF2 message header is included in the message.
For example, when creating a topic:
String str = "topic: //" + topic + "? TargetClient = "+ targetClient;
Topic topic =Session. createTopic (str );