How to set message expiry at Queue level in IBM MQ ?

We can setup message expiry using the Attribute CAPEXPRY for a queue in the CUSTOM attribute to a value.

Let say if you want to set 10 min message expiry for those message that arrive in the queue but not being consumed by the application. in This case we have to set CUSTOM(‘CAPEXPRY=60000’) for the queue. Use alter queue command.

From 9.4 LTS onwards we can directly set CAPEXPRY in the queue level. This become full attribute. No need to set using CUSTOM attribute.

Once the message expiry reached then the message discard taken care by the queue manager.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *