rabbitmq运行,消费失败重复消费,造成日志过大
1.配置:
rabbitmq:
host: 127.0.0.1
port: 5672
username: guest
password: guest
publisher-confirms: true
virtual-host: /
listener:
simple:
retry:
enabled: true
initial-interval: 6000
acknowledge-mode: auto
2.关键属性:
enabled: true
initial-interval: 6000
默认重试三次 就不会再消费
注意:如果还一直报错,需要删除下rabbitMQ报错的这个队列,不然还会一直报错