Table of Contents

Troubleshooting: "Check length prefix" error from service MQ rules


Service MQ Rules allow external systems to access your application data using the WebSphere MQ middleware messaging standard.

At runtime, an MQ listener, linked to a service MQ rule, waits and listens for incoming messages on a specified WebSphere MQ queue. You can configure MQ Listener to access text from an external system and place it in a clipboard property as follows:

  1. Create an MQ Service rule.
  2. Create an MQ Listener rule.
  3. Place the desired text in the queue.

When you run this configuration, the following error may appear in the log file: Attempting to read string from MQ > 1M in length. Check length prefix on string data.

This error is caused by an incorrect setting in the Data Type field on the Request tab of the Connect MQ rule form:



To resolve this issue, select All Chars from the Data Type drop-down menu and save the updated rule. This allows Process Commander to read the text in the queue as ASCII characters and manages the data correctly:

After making the rule change, stop and re-start any MQ Listeners that were running when you made the change.

Suggest Edit

100% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.