Queues
Introduction to WebSphere® MQ queues and queue attributes.
A WebSphere MQ queue is a named object on which applications can put messages, and from which applications can get messages.
Messages are stored on a queue, so that if the putting application is expecting a reply to its message, it is free to do other work while waiting for that reply. Applications access a queue by using the Message Queue Interface (MQI), described in The Message Queue Interface overview.
Before a message can be put on a queue, the queue must have already been created. A queue is owned by a queue manager, and that queue manager can own many queues. However, each queue must have a name that is unique within that queue manager.
A queue is maintained through a queue manager. In most cases, each queue is physically managed by its queue manager but this is not apparent to an application program. WebSphere MQ for z/OS® shared queues can be managed by any queue manager in the queue-sharing group.
To create a queue you can use WebSphere MQ commands (MQSC), PCF commands, or platform-specific interfaces such as the WebSphere MQ for z/OS operations and control panels.
You can create local queues for temporary jobs dynamically from your application. For example, you can create reply-to queues (which are not needed after an application ends). For more information, see Dynamic and Model queues.
- Browsing messages only (not retrieving them)
- Retrieving messages (and either sharing the access with other programs, or with exclusive access)
- Putting messages on the queue
- Inquiring about the attributes of the queue
- Setting the attributes of the queue
For a complete list of the options that you can specify when you open a queue, see MQOPEN - Open object.
Attributes of queues
- By the queue manager during the processing of the queue (for example, the current depth of a queue)
- Only by commands (for example, the text description of the queue)
- By applications, using the MQSET call (for example, whether put operations are allowed on the queue)
You can find the values of all the attributes using the MQINQ call.
QName
- Name of the queue
QType
- Type of the queue
QDesc
- Text description of the queue
InhibitGet
- Whether programs are allowed to get messages from the queue (although you can never get messages from remote queues)
InhibitPut
- Whether programs are allowed to put messages on the queue
DefPriority
- Default priority for messages put on the queue
DefPersistence
- Default persistence for messages put on the queue
Scope
(not supported on z/OS)- Controls whether an entry for this queue also exists in a name service
For a full description of these attributes, see Attributes for queues.