Type of index

The queue attribute, IndexType, specifies the type of index that the queue manager maintains to increase the speed of MQGET operations on the queue.

Note: Supported only on IBM MQ for z/OS .

We have five options:

Value Description
NONE No index is maintained. Use this when retrieving messages sequentially (see Priority ).
GROUPID An index of group identifiers is maintained. We must use this index type if we want logical ordering of message groups (see Logical and physical ordering ).
MSGID An index of message identifiers is maintained. Use this when retrieving messages using the MsgId field as a selection criterion on the MQGET call (see Getting a particular message ).
MSGTOKEN An index of message tokens is maintained.
CORRELID An index of correlation identifiers is maintained. Use this when retrieving messages using the CorrelId field as a selection criterion on the MQGET call (see Getting a particular message ).
Note:
  1. If we are indexing using the MSGID option or CORRELID option, set the relative MsgId or CorrelId parameters in the MQMD. It is not beneficial to set both.
  2. Browse uses the index mechanism to find a message if a queue matches all the following conditions:

    • It has index type MSGID, CORRELID, or GROUPID
    • It is browsed with the same type of id
    • It has messages of only one priority

  3. Avoid queues (indexed by MsgId or CorrelId) containing thousands of messages because this affects restart time. (This does not apply to nonpersistent messages as they are deleted at restart.)
  4. MSGTOKEN is used to define queues managed by the z/OS workload manager.

For a full description of the IndexType attribute, see IndexType. For further information on the IndexType attribute, see Design and performance considerations for z/OS applications.

Parent topic: Getting messages from a queue