連接RabbitMQ的AMQP時碰到The protocol requested by peer '0 0 9 1' does not match expected '3 1 0 0之原因與解法

連接RabbitMQ的AMQP時碰到The protocol requested by peer '0 0 9 1' does not match expected '3 1 0 0之原因是RabbitMQ的Plugin:AMQP1.0還沒有安裝上去

安裝RabbitMQ Plugin:AMQP 1.0 的步驟如下:

1.開啟命令提示字元輸入路徑如下圖:以C:\Program Files\RabbitMQ Server\rabbitmq_server-3.12.0\sbin為例

 

 

 

 

 

 

 

 

 

 

 

2.輸入如下啟用

rabbitmq-plugins enable rabbitmq_amqp1_0

3.啟用成功後記得重新啟動RabbitMQ才能生效,命令提示如下:

rabbitmq-service.bat stop
rabbitmq-service.bat start

參閱文章:https://www.rabbitmq.com/plugins.html