Messages and queues are the basic components of a message queuing system.
A message is a string of bytes that is meaningful to the applications that use it. Messages are used to transfer information from one application program to another (or between 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:
The format of the message descriptor is defined by WebSphere MQ. For a complete description of the message descriptor, see the WebSphere MQ Application Programming Reference manual.
The default maximum message length is 4 MB, although you can increase this to a maximum length of 100 MB (where 1 MB equals 1 048 576 bytes). In practice, the message length might be limited by:
It might take several messages to send all the information that an application requires.
Application programs send and receive messages using MQI calls.
For example, to put a message onto a queue, an application:
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.
A queue is a data structure used to store messages.
Each queue is owned by a queue manager. The queue manager is responsible for maintaining the queues it owns, and for storing all the messages it receives onto the appropriate queues. The messages might be put on the queue by application programs, or by a queue manager as part of its normal operation.
WebSphere MQ Version 5.3 supports queues over 2 GB in size; Enabling large queues discusses this in more detail. For information about planning the amount of storage you need for queues, see the Quick Beginnings guide for your platform, or visit the WebSphere MQ Web site for platform-specific performance reports:
http://www.ibm.com/software/ts/mqseries/
Queues can be characterized by the way they are created:
Model queues have an attribute that specifies whether the dynamic queue is to be permanent or temporary. Permanent queues survive application and queue manager restarts; temporary queues are lost on restart.
Suitably authorized applications can retrieve messages from a queue according to the following retrieval algorithms:
The MQGET request from the application determines the method used.