RabbitMq从入门到精通-channel error; protocol method: method channel.close (reply-code=406, reply-text=PRE

com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method(reply-code=406, reply-text=PRECONDITION_FAILED - unknown delivery tag 1, class-id=60, method-id=80)
    at com.rabbitmq.client.impl.ChannelN.asyncShutdown(ChannelN.java:505)
    at com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:336)
    at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:143)
    at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:90)
    at com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:634)
    at com.rabbitmq.client.impl.AMQConnection.access$300(AMQConnection.java:47)
    at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:572)
    at java.lang.Thread.run(Thread.java:748)

 

RabbitMq从入门到精通-channel error; protocol method: method channel.close (reply-code=406, reply-text=PRE_第1张图片

删除重建

还有一种可能就是二次ack了

删除手动ack代码

 channel.basicAck(deliveryTag,false);

注释掉

你可能感兴趣的:(Rabbitmq入门到精通)