Bootstrap

rabbitmq踩坑(1)

开发中rabbitmq的配置文件写错了,改正后一直报错

error occurred in message handler [org.springframework.integration.amqp.outbound.AmqpOutboundEndpoint@36e73413];
 nested exception is org.springframework.amqp.AmqpIOException: java.io.IOException

配置更改内容为

          ABCDEF:
              destination: sadadwasdadwa
              group: sdaadadada

          ABCDEF:
              destination: sadadwasdadwa
              group: sdaadadada
              consumer:
                  auto-bind-dlq: true
                  republish-to-dlq: true

在排查问题时发现了Channel shutdown: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - inequivalent arg 'x-dead-letter-exchange' for queue 'ABCDEF.sdadad' in vhost 'rabbitmq': received the value 'DLX' of type 'longstr' but current is none, class-id=50, method-id=10)

读取日志分析时x-dead-letter-exchange配置不一致导致的报错。

一开始打算重新部署来看下会不会重新注册。好像没成功。最后把队列删除后重启服务成功解决问题

悦读

道可道,非常道;名可名,非常名。 无名,天地之始,有名,万物之母。 故常无欲,以观其妙,常有欲,以观其徼。 此两者,同出而异名,同谓之玄,玄之又玄,众妙之门。

;