为什么我会收到 RabbitMQ 交换异常?
Why am I getting the RabbitMQ exchange exception?
这是我的测试队列设置,它们不正确但有效:
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)
怎么了?
inequivalent arg 'type' for exchange 'igSmev3Listener' in vhost '/': received 'fanout' but current is 'direct'
您在经纪人上已经有一个 igSmev3Listener
交易所,其类型是 fanout
,但您提供相同的名称和默认类型 - direct
.
考虑在开始申请之前删除该交换。
这感觉就像一个似曾相识的人,有类似的问题和类似的属性:
这是我的测试队列设置,它们不正确但有效:
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)
怎么了?
inequivalent arg 'type' for exchange 'igSmev3Listener' in vhost '/': received 'fanout' but current is 'direct'
您在经纪人上已经有一个 igSmev3Listener
交易所,其类型是 fanout
,但您提供相同的名称和默认类型 - direct
.
考虑在开始申请之前删除该交换。
这感觉就像一个似曾相识的人,有类似的问题和类似的属性: