This is outside of Spring AMQP, but you can configure a TTL on the dead letter queue and configure that queue to dead-letter back to the original queue when expired.
You can check the x-death
header if you want to give up completely after some number of retry cycles.
See this answer and its question for more information.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…