The maximum size for an MQ message is based on the size set in the queue manager and the queue (Maximum message length). By default, the maximum message size is 4 megabytes, but you can increase this up to 100 Megabytes (104857600 ). When changing the maximum size from one size to a larger one, a restart of the queue manager is required. See this IBM Knowledge Center article for additional discussion on increasing the maximum size of messages.
The agent and connection manager are configured by default to match the default limit. However, if the supporting environment is not setup correctly, message actions may fail and/or MQRC_DATA_LENGTH_ERROR may be returned.
Enable the following to manage larger messages.
Agent
- Find NASTEL.MMF.ADMIN.COMMAND.QUEUE local queue in each queue manager and change the "Maximum message length" property to the desired message size.
- Find NASTEL.MODEL.QUEUE model queue in each queue manager and change "Maximum message length" property to the desired message size.
- Unmanage/manage the agent to reconnect to the queue manager.
Connection Manager
- Find the associated model queue in each queue manager and change the "Maximum message length" property to the desired message size (or maximum).
- If using default settings, this will be SYSTEM.DEFAULT.MODEL.QUEUE
- if using alternate settings as described in this article, use the name specified there
- For the channel being used by the connection manager, change the "Maximum message length" property to the desired message size (or maximum).
- Unmanage/manage the connection manager to reconnect to the queue manager.