ibm-messaging / mq-jms-spring

Components to assist MQ JMS integration with Spring frameworks
Apache License 2.0
190 stars 102 forks source link

Error with listener while try to handle large truncated message #54

Closed Wouimbly closed 4 years ago

Wouimbly commented 4 years ago

SpringBoot 2.1.8.RELEASE mq-jms-spring-boot-starter 2.3.2 com.ibm.mq.allclient 9.2.0.0 IBM Java 8

2020-07-28 22:27:31 - WARN org.springframework.jms.listener.DefaultMessageListenerContainer - Setup of JMS message listener invoker failed for destination 'ABC' - trying to recover. Cause: JMSWMQ2002: Impossible d'obtenir un message de la destination 'ABC'.; nested exception is com.ibm.mq.MQException: JMSCMQ0001: L'appel IBM MQ a échoué avec le code achèvement '1' ('MQCC_WARNING') ; motif '2080' ('MQRC_TRUNCATED_MSG_FAILED'). com.ibm.msg.client.jms.DetailedMessageEOFException: JMSWMQ2002: Impossible d'obtenir un message de la destination 'MCM.INVENTAIRE.FILE'. at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:539) at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:215) at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCallSuccess(WMQMessageConsumer.java:222) at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.checkJmqiCallSuccess(WMQMessageConsumer.java:156) at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.getMsg(WMQConsumerShadow.java:1858) at com.ibm.msg.client.wmq.internal.WMQSyncConsumerShadow.receiveInternal(WMQSyncConsumerShadow.java:228) at com.ibm.msg.client.wmq.internal.WMQConsumerShadow.receive(WMQConsumerShadow.java:1461) at com.ibm.msg.client.wmq.internal.WMQMessageConsumer.receive(WMQMessageConsumer.java:674) at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receiveInboundMessage(JmsMessageConsumerImpl.java:1051) at com.ibm.msg.client.jms.internal.JmsMessageConsumerImpl.receive(JmsMessageConsumerImpl.java:667) at com.ibm.mq.jms.MQMessageConsumer.receive(MQMessageConsumer.java:209) at org.springframework.jms.support.destination.JmsDestinationAccessor.receiveFromConsumer(JmsDestinationAccessor.java:132) at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveMessage(AbstractPollingMessageListenerContainer.java:418) at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:303) at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:257) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1189) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1179) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1076) at java.lang.Thread.run(Thread.java:820) Caused by: com.ibm.mq.MQException: JMSCMQ0001: L'appel IBM MQ a échoué avec le code achèvement '1' ('MQCC_WARNING') ; motif '2080' ('MQRC_TRUNCATED_MSG_FAILED'). at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:203) ... 17 common frames omitted

ibmmqmet commented 4 years ago

Probably you need to modify the MAXMSGL on the channel, as that is the maximum size the JMS code will use when trying to receive the message. 4MB is the default value.

Wouimbly commented 4 years ago

HI! This configuration is already in place. The previous code version was running on websphere without the spring-jms-mq... So direct mq with plain old mdb with activation specs... this code is working.

But we are in a migration path to move all ou webapps to springboot-docker. We currently have many services/webapp that use successfully the spring-jsm-mq package. But the one that as file transfered over mq got this error message. I tried using a tab file and specify the maximumMessageLength in json format and still it doesn't work. By looking into the mq client browser i can see that the message type is datagram (human unreadable) and that the message is truncated (mq)

Do you know if there is a way to activate more debugging knowing that i'm running outside of WebSphere

Thanks

ibmmqmet commented 4 years ago

The effective MAXMSGL will come from the queue manager setting, and CLNTCONN and SVRCONN settings. The lowest wins. So you will need to check both your client channel definition in the CCDT and settings on the server side. I don't think CHLSTATUS shows the in-use length. It's going to be visible in a JMS client trace, but that might be tedious to try to work through.

ibmmqmet commented 4 years ago

closing as no further response