message descriptor, message lengths, sending messages, MQI (message-queuing interface), receiving messages, application programs, sending and receiving" /> What is a message?

 

What is a message?

A message is a string of bytes that is meaningful to the applications that use it. Messages are used for transferring information from one application program to another (or to different parts of the same application). The applications can be running on the same platform, or on different platforms.

WebSphere MQ messages have two parts:

 

Message lengths

The default maximum message length is 4 MB, although we can increase this to a maximum length of 100 MB (where 1 MB equals 1 048 576 bytes). In practice, the message length is limited by:

It can take several messages to send all the information that an application requires.

 

How do applications send and receive messages?

Application programs send and receive messages using MQI calls.

For example, to put a message onto a queue, an application:

  1. Opens the required queue by issuing an MQI MQOPEN call

  2. Issues an MQI MQPUT call to put the message onto the queue

Another application can retrieve the message from the same queue by issuing an MQI MQGET call.

For more information about MQI calls, see the WebSphere MQ Application Programming Reference.