Queues can be defined with an expiry interval. If a message has remained on a queue for a period of time longer than this interval then the message is marked as expired.
Messages can also have an expiry interval that overrides the value of any queue expiry interval. You can define this by adding an MQE_MSG_EXPIRETIME field to the message. The expiry time is either relative (expire 2 days after the message was created), or absolute (expire on November 25th 2000, at 08:00 hours).
To set a relative expiry time use the following on a message handle:
mqeFields_putInt32(pErrorBlock, hMsg, relativeTime);
To set an absolute expiry time use:
mqeFields_putInt64(pErrorBlock,hMsg, absoluteTime);
All Times are in milliseconds