Implemented a "max attempts" limit for a given queue item to stop retriable errors causing items to be retried for ever.