Type of index

 

Supported only on WebSphere MQ for z/OS.

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

You have five options:

Value Description
NONE No index is maintained. Use this when retrieving messages sequentially sequentially (see Priority).
GROUPID An index of group identifiers is maintained. You must use this index type if you 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. Use this when retrieving messages using the MsgToken field as a selection criterion on the MQGET call (see WebSphere MQ Workflow).
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).

  1. If you 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 the Application Programming Reference. For conditions needed to change the IndexType attribute, see the WebSphere MQ Script (MQSC) Command Reference.

 

Parent topic:

Writing a WebSphere MQ application


fg12660_