异常代码:
- 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 ‘fanout_exchange’ in vhost ‘/szheima’: received ‘direct’ but current is ‘fanout’, class-id=40, method-id=10)
解决问题:
- 原因是由于RabbitMQ中已经存在相同名字的交换机(exchange),在创建交换机时更换另一个名字即可,或者在RabbitMQ管理界面将当前同名交换机删除就可以重新创建交换机