Error creating bean with name ‘mqReceiverFactory’
异常背景
- 启动预发环境报错,项目启动异常,查看 tomcat localhost.log
- 异常信息的最后两段
Caused by: org.springframework.amqp.rabbit.listener.QueuesNotAvailableException: Cannot prepare queue for listener. Either the queue doesn’t exist or the broker will not allow us to use it.
at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.start(BlockingQueueConsumer.java:407) ~[spring-rabbit-1.3.5.RELEASE.jar:na]
at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer DeclarationException: Failed to declare queue(s):[log_queue]
at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.attemptPassiveDeclarations(BlockingQueueConsumer.java:458) ~[spring-rabbit-1.3.5.RELEASE.jar:na]
at org.springframework.amqp.rabbit.listener.BlockingQueueConsumer.start(BlockingQueueConsumer.java:379) ~[spring-rabbit-1.3.5.RELEASE.jar:na]
- 提示队列信息不存在,找不到该队列
- 反思
- 由于验证流程的原因,部分功能不发布预发环境而直接上线,表或队列信息创建并没有同步到预发环境
- 需要建立完整的规范流程并执行