Problem/Motivation
Items in the queue cannot be reclaimed or get incorrect lease times leading to unexpected behaviour with expiration and claims.
There are three errors:
- The system cron only resets the expired items of the Database Queue. Memory queue items can never be reclaimed, because their expire value is never set to 0.
- The cron time and the lease time are incorrectly using the same value defined in the annotation of the queue worker.
- The lease time for items in cron-based queues are incorrectly set to 1 second.
Proposed resolution
1. Let queues handle expiration of items themselves.
2. Fix the lease time for cron based queues.
3. Allow queueworkers to set specific lease times as well as cron times.
API changes
Added cron lease time in the QueueWorker annotation definition.