Closed JakesIV closed 4 years ago
I found that when we use the "usr" properties in the RFH2 header then JMS cannot parse the message. The usr properties are set in IIB9/ACE so we are sure its set correctly. I tested this with pure JMS so it has nothing to do with these libraries, Its a JMS failure. Will close this as we now have an answer for the problem.
Please include the following information in your ticket.
A small code sample that demonstrates the issue. @JmsListener(destination = "INPUTQ.NAME") public void onAuditMessage(final Message receivedMessage) { if (receivedMessage instanceof BytesMessage) { BytesMessage bytesMessage = (BytesMessage) receivedMessage; byte[] bytesreceived; try { bytesreceived = new byte[(int) bytesMessage.getBodyLength()]; bytesMessage.readBytes(bytesreceived); MQMessage mqMsg = new MQMessage(); mqMsg.write(bytesreceived); mqMsg.encoding = receivedMessage.getIntProperty(WMQConstants.JMS_IBM_ENCODING); mqMsg.format = receivedMessage.getStringProperty(WMQConstants.JMS_IBM_FORMAT); String codePage = receivedMessage.getStringProperty(WMQConstants.JMS_IBM_CHARACTER_SET);
}
The message never gets delivered to the JMSListener class and fails with the IBM MQ code with this error com.ibm.msg.client.jms.DetailedMessageFormatException: JMSCMQ1050: The MQRFH2 header has an incorrect format. Received a message with a badly formed MQRFH2 header. Ensure that any non-JMS applications building messages with MQRFH2 headers create well-formed MQRFH2 headers.
com.ibm.msg.client.jms.DetailedJMSException: JMSCMQ1000: Failed to create JMS message. The wrong message type or properties were specified when creating a base message with messageID = '414D51204D514D425541543031202020A34F315E2F97132A' and correlationID = '000000000000000000000000000000000000000000000000'. Check the linked IBM MQ exception reason and completion code for more information and check the log file for detailed message contents.
This seems to only happen with the EBCIDIC messages.
Problem one, why is the rrorr not reported back to my code. Problem two, the message are read of the queue and we loose this message, no opportunity for us to handle the exception. Problem three, why does it fail on EBCDIC messages?
Thanks
Jacques