I’m trying to set the ‘CodedCharSetId’ attribute to 5026 within the MQMD header for messages sent from my Spring Boot 3.1 JMS application to an IBM MQ server (v9.3, Linux).
Here’s what I’ve done:
- MessagePostProcessor Implementation: I created a JmsMessagePostProcessor class to modify the message properties before sending. Inside the postProcessMessage method, I’m setting the following properties:
- WMQConstants.JMS_IBM_ENCODING to ‘785’ (assuming this represents the desired encoding)
- WMQConstants.JMS_IBM_CHARACTER_SET to ‘5026’ (the target character set)
- Sending the Message: I’m using the convertAndSend method of org.springframework.jms.core.JmsTemplate to send the message to the MQ server.
The Problem:
I expect the MQMD to show:
- Encoding: 785 CodedCharSetId: 5026
However, the actual MQMD shows:
- Encoding: 785 CodedCharSetId: 930 (This value seems to be overridden)
What’s Odd:
I can successfully set CodedCharSetId to other values like 932, but specifically for 5026, it always gets overridden to 930.
Request for Advice:
Can you suggest any reasons why this might be happening and how I can ensure the CodedCharSetId is set to 5026 in the MQMD?
Thanks in advance!
/kelvin
Kelvin Shao is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.