![autoexpire autoexpire](https://www.atlantaduilawyer.com/wp-content/uploads/2017/03/expired-tag.jpg)
To set the CAPEXPRY value on a queue the following alter command can be issued (the following is for 10 minutes):ĪLTER QL(REQUEST.QUEUE) CUSTOM('CAPEXPRY(6000)') No need to use CAPEXPRY on the model queues for the subscribers, nor on the provided queues. If you set CAPEXPRY but there are already some messages in the queue, then this setting does NOT affect existing messages (that is, that arrived PRIOR to the setting/change of the attribute). If CAPEXPRY is enabled for a queue, then a new message that arrives to the queue will get the expiration date specified by CAPEXPRY.ĬAPEXPRY applies ONLY to NEW messages that arrive to the queue. When the message is retrieved by an application using the MQGET call, the Expiry field represents the expiry time that still remains. However, the expiration time is treated as approximate, and the value need not be decremented to reflect small time intervals.
![autoexpire autoexpire](https://res.cloudinary.com/quotellc/image/upload/c_fill,g_auto,h_325,w_900,f_auto,q_auto/ciccom/AdobeStock_66031150-1600x1600.jpg)
Likewise, an application forwarding this message to another queue might decrement the value if necessary, if it has retained the message for a significant time. It can also be decremented by message channel agents to reflect transmission times, if these are significant. The value is decremented to reflect the time that the message spends on the destination queue, and also on any intermediate transmission queues if the put is to a remote queue. The message becomes eligible to be discarded if it has not been removed from the destination queue before this period of time elapses. This is a period of time expressed in tenths of a second, set by the application that puts the message. IBM MQ 9.1.x / IBM MQ / Reference / Developing applications reference / MQI applications reference / Data types used in the MQIMQMD - Message descriptor / Fields for MQMD / +++ Section 1: Specifying the expiration of the messageġ.a) The application can explicitly set the Expiry attribute for a message: