赞
踩
Channel shutdown: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - unknown delivery tag 1, class-id=60, method-id=80)
spring:
rabbitmq:
host: 000
port: 5672
username: 000
password: 000
virtual-host: /000
publisher-returns: true
listener:
simple:
acknowledge-mode: manual # 手动应答
prefetch: 1 #每次从队列中取一个,轮询分发,默认是公平分发
retry:
max-attempts: 5 # 重试次数
enabled: true # 开启重试
try{
...这里一堆逻辑...
// 处理完之后手动签收
channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
} catch (Exception e) {
log.error("【传播渠道记录1】 接收到消息为:" + skuIdStr + " ,消息异常消费 : ", e);
} finally {
// 处理完之后手动签收(这里再次签收)
channel.basicAck(message.getMessageProperties().getDeliveryTag(), false);
}
消费者内部重复签收导致签收异常。。。。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。