3
votes

We are using spring integration to connect to IBM MQ V7.5 to read messages from queue. We occasionally get large messages to read. SI jms adapter fails to read to large message, but it works for smaller messages. Below is the exception we are getting

23:18:35,470  WARN DefaultMessageListenerContainer:839 - Setup of JMS message listener invoker failed for destination 'queue:///Cis.Orders' - trying to recover. Cause:
JMSWMQ2002: Failed to get a message from destination 'XXX'.; 
nested exception is com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '1' ('MQCC_WARNING') reason '2080' ('MQRC_TRUNCATED_MSG_FAILED').
com.ibm.msg.client.jms.DetailedMessageEOFException: JMSWMQ2002: Failed to get a message from destination 'Cis.Orders'.
WebSphere MQ classes for JMS attempted to perform an MQGET; however WebSphere MQ reported an error.
Use the linked exception to determine the cause of this error.
at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:524)
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:216)
at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCallSuccess(WMQMessageConsumer.java:124)
at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.getMsg(WMQConsumerShadow.java:1376)
at com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.receiveInternal(WMQSyncConsumerShadow.java:227)
at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.receive(WMQConsumerShadow.java:1109)
at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.receive(WMQMessageConsumer.java:460)
at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receiveInboundMessage(JmsMessageConsumerImpl.java:766)
at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receive(JmsMessageConsumerImpl.java:474)
at com.ibm.mq.jms.MQMessageConsumer.receive(MQMessageConsumer.java:212)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveMessage(AbstractPollingMessageListenerContainer.java:430)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:310)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1102)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1094)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:991)
at java.lang.Thread.run(Thread.java:662)
Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '1' ('MQCC_WARNING') reason '2080' ('MQRC_TRUNCATED_MSG_FAILED').
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:204)
... 15 more

Any help would be appreciated. Thanks for your time.

2
"...('MQCC_WARNING') reason '2080' ('MQRC_TRUNCATED_MSG_FAILED')..." from near the top of your exception trace suggests that either one component in the system has a maximum length that your really long messages exceed, or that your really long messages take so long to transmit that something times out the connection before the transfer is complete and then fails to process the partial message. I'd suggest looking for maximum message size or time out periods in the configuration for your components.Dan Is Fiddling By Firelight
Thanks Artem, I increased receive-timeout on jms channel and still the same error, I suspect MQGET sends a default buffersize of 4MB and if the message is > 4MB, spring default listener should catch this exception and do another MQGET setting buffer size data length. Not sure my theory is correct.user3814196

2 Answers

0
votes

The application buffer looks to be too small for your message. http://www-01.ibm.com/support/docview.wss?uid=swg21167205

0
votes

The JMS client shouldn't ever return MQRC_TRUNCATED_MSG_FAILED, as you don't have any physical control over the buffer sizes in use, and this error indicates the receive buffer was too small to receive the message.

It's difficult to tell without the full exception stack, and without knowing your current version, but you could try upgrading to 7.5.0.3, the newest MQ 7.5 fix pack.

Or you could open a PMR with IBM support to investigate.