rabbitMQ 重试

rabbitMQ 重试机制 

spring.rabbitmq.listener.simple.retry.max-attempts=5 最大重试次数
spring.rabbitmq.listener.simple.retry.enabled=true 是否开启消费者重试(为false时关闭消费者重试,这时消费端代码异常会一直重复收到消息)
spring.rabbitmq.listener.simple.retry.initial-interval=5000 重试间隔时间(单位毫秒)
spring.rabbitmq.listener.simple.default-requeue-rejected=false 重试次数超过上面的设置之后是否丢弃(false不丢弃时需要写相应代码将该消息加入死信队列)

https://www.cnblogs.com/xishuai/p/spring-boot-rabbitmq-delay-queue.html

https://www.jianshu.com/p/35fbbdc9ca60

原文地址:https://www.cnblogs.com/Struts-pring/p/11152303.html