When investigating a MQ JMS performance problem, I noticed that there was a pattern of
MQGET – 2080 (0820) (RC2080): MQRC_TRUNCATED_MSG_FAILED
followed by an MQGET with a bigger buffer which worked.
Being a performance person these double gets did not look right to me.
I spoke to Paul Titheridge of IBM who said this was fixed back in MQ V6 with a java property
com.ibm.mq.jmqi.defaultMaxMsgSize
If you specify
-Dcom.ibm.mq.jmqi.defaultMaxMsgSize=8192
in the Java start-up you will get an 8KB buffer instead of the default 4KB.
Easy when you know how!
I would suggest that the best value for com.ibm.mq.jmqi.defaultMaxMsgSize is to use the value for “Maximum Message Length” (MAXMSGL) queue attribute from the particular queue that the code is doing the MQGET on.
LikeLike