1.找不到交换机exchange
Channel shutdown: channel error; protocol method: # method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no exchange 'amq.direct' in vhost 'testhost', class-id=60, method-id=40)
原因:查看下图红框中是否有exchange ‘amq.direct’,没有则会报错,添加即可
2.同一个Vhost下不可添加相同类型(Type)的exchange
channel is already closed due to channel error; protocol method: # method(reply-code=406, reply-text=PRECONDITION_FAILED - cannot switch from tx to confirm mode, class-id=85, method-id=10)
原因:添加相同类型(Type)的exchange