Alias queues
An alias queue is an IBM MQ object used to access another queue or a topic. This means that more than one program can work with the same queue, accessing it using different names.
The queue resulting from the resolution of an alias name, known as the base queue, can be any of the following types of queues, as supported by the platform:
- A local queue
- The local definition of a remote queue.
- A shared queue, which is a type of local queue only available on IBM MQ for z/OS .
- A predefined queue
- A dynamic queue
An alias name can also resolve to a topic. If an application currently puts messages onto a queue, it can be made to publish to a topic by making the queue name an alias for the topic. No change to the application code is necessary.
Note: An alias cannot directly resolve to another alias on the same queue manager.An example of the use of alias queues is for a system administrator to give different access authorities to the base queue name (that is, the queue to which the alias resolves) and to the alias queue name. This means that a program or user can be authorized to use the alias queue, but not the base queue.
Alternatively, authorization can be set to inhibit put operations for the alias name, but allow them for the base queue.
In some applications, the use of alias queues means that system administrators can easily change the definition of an alias queue object without having to get the application changed.
IBM MQ makes authorization checks against the alias name when programs try to use that name. It does not check that the program is authorized to access the name to which the alias resolves. A program can therefore be authorized to access an alias queue name, but not the resolved queue name.
In addition to the general queue attributes described in Queues, alias queues have a BaseQName attribute. This is the name of the base queue to which the alias name resolves. For a fuller description of this attribute, see BaseQName (MQCHAR48).
The InhibitGet and InhibitPut attributes (see Queues ) of alias queues belong to the alias name. For example, if the alias-queue name ALIAS1 resolves to the base-queue name BASE, inhibitions on ALIAS1 affect ALIAS1 only and BASE is not inhibited. However, inhibitions on BASE also affect ALIAS1.
The DefPriority and DefPersistence attributes also belong to the alias name. So, for example, we can assign different default priorities to different aliases of the same base queue. Also, we can change these priorities without having to change the applications that use the aliases.
Parent topic: Queues