Java 为什么会出现RabbitMQ exchange异常?

Java 为什么会出现RabbitMQ exchange异常?,java,rabbitmq,spring-rabbit,rabbitmq-exchange,Java,Rabbitmq,Spring Rabbit,Rabbitmq Exchange,以下是我的测试队列设置,它们不正确,但可以工作: mq: username: guest password: guest host: localhost port: ${QA_RABBIT_LISTENER} ig-smev3: listener: vhost: / exchangeName: igSmev3Listener queueName: igSmev3-ListenerQueue routingKey: igS

以下是我的测试队列设置,它们不正确,但可以工作:

mq:
  username: guest
  password: guest
  host: localhost
  port: ${QA_RABBIT_LISTENER}
  ig-smev3:
    listener:
      vhost: /
      exchangeName: igSmev3Listener
      queueName: igSmev3-ListenerQueue
      routingKey: igSmev3-Listener
    producer:
      vhost: /
      exchangeName: igSmev3Producer
      queueName: igSmev3-ProducerQueue
      routingKey: igSmev3-Producer
如果我设定

vhost: /
      exchangeName: igSmev3Producer
      queueName: igSmev3ProducerQueue
      routingKey: igSmev3Producer
我将得到一个错误:

Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - inequivalent arg 'type' for exchange 'igSmev3Listener' in vhost '/': received 'fanout' but current is 'direct', class-id=40, method-id=10)
原因:com.rabbitmq.client.ShutdownSignalException:通道错误;协议方法:#方法(回复代码=406,回复文本=Premission_失败-vhost'/'中exchange'igSmev3Listener'的参数'type'不相等:收到'fanout'但当前为'direct',类id=40,方法id=10)
怎么了

vhost“/”中的exchange“igSmev3Listener”的参数“type”不等效:接收到“扇出”,但当前为“直接”

您在代理上已经有一个
igSmev3Listener
交换,其类型为
fanout
,但您提供了相同的名称和默认类型-
direct

在启动应用程序之前,请考虑删除该exchange


这感觉就像是似曾相识,有着类似的问题和类似的属性:

我没有交换,它只是从一个Docker Rabbit集装箱开始,我正在用ConcordianOK测试它。然后在应用程序中的其他地方使用
fanout
类型创建它…是的。。。我必须注意,但我没有。问题解决了。非常感谢。