rabbitMQ 重試

rabbitMQ 重試機制 html

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不丟棄時須要寫相應代碼將該消息加入死信隊列)spring

 

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

 

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

相關文章
相關標籤/搜索