IndexType (MQLONG)
This specifies the type of index that the queue manager maintains for messages on the queue.
Local | Model | Alias | Remote | Cluster |
---|---|---|---|---|
X | X |
- MQIT_NONE
- No index is maintained by the queue manager for this queue. Use this value for queues that are typically processed sequentially, that is, without using any selection criteria on the MQGET call.
- MQIT_MSG_ID
- The queue manager maintains an index that uses the message identifiers of the messages on the queue. Use this value queues where the application typically retrieves messages using the message identifier as the selection criterion on the MQGET call.
- MQIT_CORREL_ID
- The queue manager maintains an index that uses the correlation identifiers of the messages on the queue. Use this value for queues where the application typically retrieves messages using the correlation identifier as the selection criterion on the MQGET call.
- MQIT_MSG_TOKEN
- Important: This index type should only be used for queues used with the IBM MQ Workflow for z/OS product.
- MQIT_GROUP_ID
- The queue manager maintains an index that uses the group identifiers of the messages on the
queue. This value must be used for queues where the application
retrieves messages using the MQGMO_LOGICAL_ORDER option on the MQGET
call. A queue with this index type cannot be a transmission queue. A
shared queue with this index type must be defined to map to a
CFSTRUCT object at CFLEVEL(3) or higher. Note:
- The physical order of messages on a queue with index type MQIT_GROUP_ID is not defined, as the queue is optimized for efficient retrieval of messages using the MQGMO_LOGICAL_ORDER option on the MQGET call. This means that the physical order of the messages is not typically the order in which the messages arrived on the queue.
- If an MQIT_GROUP_ID queue has a MsgDeliverySequence of MQMDS_PRIORITY, the queue manager uses message priorities 0 and 1 to optimize the retrieval of messages in logical order. As a result, the first message in a group must not have a priority of zero or one; if it does, the message is processed as though it had a priority of two. The Priority field in the MQMD structure is not changed.
For more information about message groups, see the description of the group and segment options in MQGMO - Options field.
The index type that should be used in various cases is shown in Table 2 and Table 3.
Selection criteria on MQGET call | Index type for nonshared queue | Index type for shared queue |
---|---|---|
None | Any | Any |
Selection using one identifier: | ||
Message identifier | MQIT_MSG_ID suggested | MQIT_NONE or MQIT_MSG_ID required; MQIT_MSG_ID suggested |
Correlation identifier | MQIT_CORREL_ID suggested | MQIT_CORREL_ID required |
Group identifier | MQIT_GROUP_ID suggested | MQIT_GROUP_ID required |
Selection using two identifiers: | ||
Message identifier plus correlation identifier | MQIT_MSG_ID or MQIT_CORREL_ID suggested | MQIT_NONE or MQIT_MSG_ID or MQIT_CORREL_ID required
(For efficiency, it is suggested that the index type is chosen to match the MQMD field which will have the most distinct keys) |
Message identifier plus group identifier | MQIT_MSG_ID or MQIT_GROUP_ID suggested | Not supported |
Correlation identifier plus group identifier | MQIT_CORREL_ID or MQIT_GROUP_ID suggested | Not supported |
Selection using three identifiers: | ||
Message identifier plus correlation identifier plus group identifier | MQIT_MSG_ID or MQIT_CORREL_ID or MQIT_GROUP_ID suggested | Not supported |
Selection using group-related criteria: | ||
Group identifier plus message sequence number | MQIT_GROUP_ID required | MQIT_GROUP_ID required |
Message sequence number (must be 1) | MQIT_GROUP_ID required | MQIT_GROUP_ID required |
Selection using message token: | ||
Message token for application use | Do not use MQIT_MSG_TOKEN | |
Message token for WLM use | MQIT_MSG_TOKEN required | Not supported |
Selection criteria on MQGET call | Index type for nonshared queue | Index type for shared queue |
---|---|---|
None | MQIT_GROUP_ID required | MQIT_GROUP_ID required |
Selection using one identifier: | ||
Message identifier | MQIT_GROUP_ID required | Not supported |
Correlation identifier | MQIT_GROUP_ID required | Not supported |
Group identifier | MQIT_GROUP_ID required | MQIT_GROUP_ID required |
Selection using two identifiers: | ||
Message identifier plus correlation identifier | MQIT_GROUP_ID required | Not supported |
Message identifier plus group identifier | MQIT_GROUP_ID required | Not supported |
Correlation identifier plus group identifier | MQIT_GROUP_ID required | Not supported |
Selection using three identifiers: | ||
Message identifier plus correlation identifier plus group identifier | MQIT_GROUP_ID required | Not supported |
To determine the value of this attribute, use the MQIA_INDEX_TYPE selector with the MQINQ call.
This attribute is supported only on z/OS.