Message segmentation

Use this information to learn about segmenting messages.

Note: Not supported in IBM® MQ for z/OS® or by applications using IBM MQ classes for JMS.

Increasing the maximum message length as explained in topic Increasing the maximum message length has some negative implications. Also, it can still result in the message being too large for the queue or queue manager. In these cases, you can segment a message. For information about segments, see Message groups.

The next sections look at common uses for segmenting messages. For putting and destructively getting, it is assumed that the MQPUT or MQGET calls always operate within a unit of work. Always consider using this technique to reduce the possibility of incomplete groups being present in the network. Single-phase commit by the queue manager is assumed, but other coordination techniques are equally valid.

Also, in the getting applications, it is assumed that if multiple servers are processing the same queue, each server executes similar code, so that one server never fails to find a message or segment that it expects to be there (because it had specified MQGMO_ALL_MSGS_AVAILABLE or MQGMO_ALL_SEGMENTS_AVAILABLE earlier).

Putting and getting a segmented message that spans units of work

You can put and get a segmented message that spans a unit of work in a similar way to Putting and getting a group that spans units of work.

You cannot, however, put or get segmented messages in a global unit of work.