Types of queue
The types of queue that WebSphere MQ supports for applications to use are:
- Local and remote queues
- A queue is known to a program as local if it is owned by the queue manager to which the program is connected; the queue is known as remote if it is owned by a different queue manager. The important difference between these two types of queue is that we can get messages only from local queues. (We can put messages on both types of queue.)
The queue definition object, created when you define a local queue, holds the definition information of the queue as well as the physical messages put on the queue. The queue definition object, created when you define a remote queue, only holds the information necessary for the local queue manager to locate the queue to which you want your message to go. This object is known as the local definition of a remote queue. All the attributes of the remote queue are held by the queue manager that owns it, because it is a local queue to that queue manager.
- Shared queues
- Shared queues are available only on WebSphere MQ for z/OS.
A shared queue is a type of local queue whose messages can be accessed by one or more queue managers that are in a queue-sharing group. (This is not the same as a queue being shared by more than one application, using the same queue manager.) Shared queues are held by a coupling facility (CF), and are accessible by any queue manager in the queue-sharing group. Each shared queue in a queue-sharing group must have a name that is unique within that group. See the WebSphere MQ for z/OS Concepts and Planning Guide for a full discussion of shared queues and queue-sharing groups.
- Alias queues
- To your program, an alias queue appears to be a queue, but it is really a WebSphere MQ object that we can use to access another queue. This means that more than one program can work with the same queue, accessing it using different names.
- Model and dynamic queues
- A model queue is a template of a queue definition used only when you want to create a dynamic local queue.
We can create a local queue dynamically from a WebSphere MQ program, naming the model queue that you want to use as the template for the queue attributes. At that point we can change some attributes of the new queue. However, we cannot change the DefinitionType. If, for example, you require a permanent queue, select a model queue with the definition type set to permanent. Some conversational applications can use dynamic queues to hold replies to their queries because they probably do not need to maintain these queues after they have processed the replies.
- Cluster queues
- A cluster queue is a queue that is hosted by a cluster queue manager and made available to other queue managers in the cluster.
The cluster queue manager makes a local queue definition for the queue specifying the name of the cluster that the queue is to be available in. This definition has the effect of advertising the queue to the other queue managers in the cluster. The other queue managers in the cluster can put messages to a cluster queue without needing a corresponding remote-queue definition. A cluster queue can be advertised in more than one cluster. See What is a cluster? and WebSphere MQ Queue Manager Clusters for further information.
Parent topic:
Queues
fg10950_