Spring RetryTemplate 重试:关闭 RocketMQ 自动重试
使用 RetryTemplate 进行重试时,建议关闭 RocketMQ 自动重试,以避免重复重试导致消息重复消费的问题。如果 RocketMQ 自动重试和 RetryTemplate 同时开启,可能会导致重试次数过多,造成消息重复消费的情况。因此,在使用 RetryTemplate 进行重试时,可以通过设置 RocketMQ 的 MaxReconsumeTimes 参数为 0 来关闭 RocketMQ 自动重试。
原文地址: https://www.cveoy.top/t/topic/nZEa 著作权归作者所有。请勿转载和采集!