我们使用spring集成连接到IBM MQ V7.5以从队列中读取消息。我们偶尔会收到大量的消息。 SI jms适配器无法读取大型消息,但它适用于较小的消息。以下是我们的例外
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
任何帮助将不胜感激。谢谢你的时间。
答案 0 :(得分:0)
应用程序缓冲区看起来太小而不适合您的邮件。 http://www-01.ibm.com/support/docview.wss?uid=swg21167205
答案 1 :(得分:0)
JMS客户端不应该返回MQRC_TRUNCATED_MSG_FAILED,因为您没有对正在使用的缓冲区大小进行任何物理控制,并且此错误表示接收缓冲区太小而无法接收消息。
如果没有完整的异常堆栈,并且不知道您当前的版本,很难说,但您可以尝试升级到最新的MQ 7.5修订包7.5.0.3。
或者您可以在IBM支持下打开PMR进行调查。