Handling messages greater than 4 MB
Messages can be too large for the application, queue, or queue manager. Depending on the environment, IBM® MQ provides a number of ways of dealing with messages that are larger than 4 MB. The maximum message size is 100 MB.
About this task
You can increase the MaxMsgLength queue and queue manager attributes to
reflect the size of the messages using the queue, up to a maximum message size of 100 MB. This
method of handling large messages is easy and convenient. However, consider the following factors
before using it:
- Uniformity among queue managers is reduced. The maximum size of message data is determined by the MaxMsgLength for each queue (including transmission queues) on which the message will be put. This value is often defaulted to the queue manager's MaxMsgLength, especially for transmission queues. This makes it difficult to predict whether a message is too large when it is to travel to a remote queue manager.
- Usage of system resources is increased. For example, applications need larger buffers, and on some platforms there might be increased usage of shared storage. Queue storage is affected only if actually required for larger messages.
- Channel batching is affected. A large message still counts as just one message towards the batch count but needs longer to transmit, thereby increasing response times for other messages.
On IBM MQ for Multiplatforms, you have two
additional options for handling large messages up to the maximum message length of 100 MB:
- Message segmentation, where each large messages is sent in several smaller chunks. Messages can be segmented by either the application or the queue manager.
- Reference messages, where a pointer to the message is sent with instructions that tell the destination how to get the actual message.