RabbitMQ异常报错

  1. Shutdown Signal: channel error;
  2. PublisherCallbackChannel is closed

2023-03-16 12:35:34.860] ERROR TID: N/A AMQP Connection xxxxxxxx o.s.a.r.c.CachingConnectionFactory: Shutdown Signal: channel error; protocol method: #method(reply-code=406, reply-text=PRECONDITION_FAILED - unknown delivery tag 1, class-id=60, method-id=80)
[2023-03-16 12:35:35.856] INFO  TID: N/A org.springframework.amqp.rabbit.RabbitListenerEndpointContainer#2-3 o.s.a.r.l.SimpleMessageListenerContainer: Restarting Consumer@5c53732c: tags=[[amq.ctag-wpn38l5O_6EN0y2AwH1sUA]], channel=Cached Rabbit Channel: PublisherCallbackChannelImpl: AMQChannel(amqp://test_mq@0), conn: Proxy@1c7744c1 Shared Rabbit Connection: SimpleConnection@34cfdd84 [delegate=amqp://test_mq@xxxxxxxxxx, localPort= xxxxxx], acknowledgeMode=AUTO local queue size=0

        以上两种错误,多是由于项目中RabbitMQ 消费者收到消息后 既有手动 ACK 又有自动ACK (统一注解,自己实体的)混合造成。

        查看 yaml 配置文件,rabbitMQ 配置项是手动 还是 自动 ACK, 再查看所在项目中 监听 MQ 的消费者 是否存在 统一注解,同时自己又手动触发ACK,去掉一个。

        RabbitMQ异常报错_第1张图片

 

你可能感兴趣的:(运维,rabbitmq,java-rabbitmq)