I am setting a Long property on a TextMessage msg.setLongProperty("publishSequence", pubSeq);, and sending it to a local IBM WebSphere MQ Queue manager for sending to a remote queue. The message is sending fine, but MQ is removing the Long property when it puts the MQ properties in the message header.
Has anyone else encountered this problem before? And if so, how did you work around it?
The following link was able to answer my question. I have tested and it works.
I used
queue.setMessageBodyStyle(WMQConstants.WMQ_MESSAGE_BODY_JMS);on the MQQueue object to set the body style to JMS so it would retain the property.