predefined (permanent) queues, permanent (predefined) queues, predefined (permanent) queue, creating, description of, dynamic queues, dynamic (temporary) queues, dynamic (temporary) queue, temporary (dynamic) queues, model queues, model queue, creating a model queue, retrieving messages from queues, messages, retrieving messages from, application programs, retrieval algorithms, retrieval algorithms for messages" />
What is a queue?
A queue is a data structure used to store messages. The messages are put on the queue by application programs, or by a queue manager as part of its normal operation.
Each queue is owned by a queue manager. The queue manager maintains the queues it owns and stores all the messages it receives onto the appropriate queues.
WebSphere MQ V6 supports queues over 2 GB in size; Enabling large queues discusses this in more detail. For information about planning the amount of storage we need for queues, visit the WebSphere MQ Web site for platform-specific performance reports:
http://www.ibm.com/software/ts/mqseries/
Predefined queues and dynamic queues
Queues can be characterized by the way that they are created:
- Predefined queues are created by an administrator using the appropriate WebSphere MQ script (MQSC) commands. Predefined queues are permanent; they exist independently of the applications that use them and survive WebSphere MQ restarts.
- Dynamic queues are created when an application issues an OPEN request specifying the name of a model queue. The queue created is based on a template queue definition, which is the model queue. We can create a model queue using the MQSC DEFINE QMODEL command. The attributes of a model queue, for example the maximum number of messages that can be stored on it, are inherited by any dynamic queue that is created from it.
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.
For further information about MQSC, see WebSphere MQ Script (MQSC) Command Reference.
Retrieving messages from queues
Suitably authorized applications can retrieve messages from a queue according to the following retrieval algorithms:
- First-in-first-out (FIFO)
- Message priority, as defined in the message descriptor. Messages that have the same priority are retrieved on a FIFO basis.
- A program request for a specific message.
The MQGET request from the application determines the method used.