QueuesNotAvailableException:无法为侦听器准备队列要么队列不存在,要么代理不允许我们使用它

问题描述

将Rabbit MQ 版本从3.7 更新到3.8 后,我们开始出现以下异常

我们正在启动微服务

{"timestamp":"2021-01-07T12:41:05.738+00:00","class":"org.springframework.amqp.rabbit.connection.CachingConnectionFactory","thread-id":"main","level":"INFO","type":"createBareConnection","logMessage":"Created new connection: rabbitConnectionFactory#5b5e7036:1/SimpleConnection@1e734eee [delegate=amqp://test@172.40.1.237:5672/,localPort= 40702]"}
{"timestamp":"2021-01-07T12:41:05.740+00:00","class":"com.rabbitmq.client.impl.ForgivingExceptionHandler","thread-id":"AMQP Connection 172.40.1.237:5672","level":"WARN","type":"log","logMessage":"An unexpected connection driver error occured (Exception message: Connection reset)"}
{"timestamp":"2021-01-07T12:41:06.747+00:00","level":"ERROR","logMessage":"Channel shutdown: connection error; protocol method: #method<connection.close>(reply-code=503,reply-text=COMMAND_INVALID - unkNown exchange type 'x-delayed-message',class-id=40,method-id=10)"}

我们使用的是弹簧靴

<artifactId>spring-boot-starter-parent</artifactId>
 <version>2.3.5.RELEASE</version>

 <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-amqp</artifactId>
  </dependency>

我们使用 RabbitListener 来绑定和创建队列

@RabbitListener(bindings = @QueueBinding(
        value = @Queue(value = "state.Transaction",durable = "true",autoDelete = "false"),exchange = @Exchange(value = "state.exchange",durable = "true"),key = "state.Transaction"))
 rabbitmq:
    host: "rabbitmq-1-xyx.internal.xzy.zzz"
    password: test
    username: test

并且这个测试用户拥有所有的超级权限 rabbitmqctl set_permissions -p / test "." "." ".*"

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...