Expiring global units of work
The queue manager can be configured to expire global units of work after a pre-configured interval of inactivity.
Change versionlist box. To go to the topic in a later version, edit the version number in the URL box in your browser.
- AMQ_TRANSACTION_EXPIRY_RESCAN=<rescan interval in milliseconds>
- AMQ_XA_TRANSACTION_EXPIRY=<timeout interval in milliseconds>
External transaction managers keep only a log of transactions that are prepared, committed, or rolled back. If the external transaction manager goes down for any reason, on its return it drives prepared, committed, and rolled back transactions to completion but any active transactions that have yet to be prepared become orphaned. To avoid this, set the AMQ_XA_TRANSACTION_EXPIRY to allow for the expected interval between an application making MQI transactional API calls and completing the transaction, having carried out transactional work on other resource managers.
To ensure a timely cleanup after the AMQ_XA_TRANSACTION_EXPIRY expires, set the AMQ_TRANSACTION_EXPIRY_RESCAN value to a lower value than the AMQ_XA_TRANSACTION_EXPIRY interval, ideally so that the rescan occurs more than once within the AMQ_XA_TRANSACTION_EXPIRY interval.