[V8.0.0.4 Oct 2015]

Enforcing lower expiration times

Administrators can limit the expiry time of any message put to a queue or topic by using the CAPEXPRY attribute specified in the CUSTOM attribute on the queue or topic.

[z/OS]To enable this feature on z/OS®, you must apply APAR PI50761 and enable the new feature with the MQSC command RECOVER QMGR (TUNE CAPEXPRY ON).
Important: The RECOVER QMGR command is reserved for use by IBM®, and should normally only be used under guidance by IBM support.

[z/OS]You can either enter the command at a console, or to the queue manager configuration, by adding to a file processed in the CSQINP2 concatenation during queue manager start up. Note that the effect of the command does not persist over a queue manager restart.

An expiry time specified in the Expiry field of the MQMD, by an application,which is greater than the CAPEXPRY value specified in the CUSTOM attribute on the queue or topic will be replaced by that CAPEXPRY value. An expiry time specified by an application, which is lower than the CAPEXPRY value will be used.

Note that the value of CAPEXPRY is expressed in tenths of seconds, so one minute has a value of 600.

If more than one object is used on the resolution path, for example, when a message is put to an alias or remote queue, then the lowest of all the CAPEXPRY values is used as the upper limit for message expiry.

Changes to the CAPEXPRY values take effect immediately. The expiry value is evaluated for each put to a queue or topic and so is sensitive to the object resolution, which may differ between each put operation.

However, note that existing messages in the queue, prior to a change in CAPEXPRY, are not affected by the change (that is, their expiry time remains intact). Only new messages that are put into the queue after the change in CAPEXPRY have the new expiry time.

For example, in a cluster where a put is performed to a queue opened with MQOO_BIND_NOT_FIXED, messages can be assigned different expiry values on each put, depending on the CAPEXPRY value set for the transmission queue, used by the channel, that sends the message to the selected target queue manager.

Note that a put to a queue or topic by a JMS application specifying a delivery delay fails with MQRC_EXPIRY_ERROR, if the delivery delay is beyond the resolved expiry time for the target queue or topic. A CAPEXPRY attribute set on a queue resolved for a JMS Destination can cause this error.

Note: CAPEXPRY must not be used on any queues that will hold IBM MQ internally-generated messages such as any SYSTEM.CLUSTER.* queue and the SYSTEM.PROTECTION.POLICY.QUEUE.