控制台报错信息:
2019-09-24 13:05:30.145 ERROR 8444 --- [168.47.131:5672] o.s.a.r.c.CachingConnectionFactory : Channel shutdown: connection error; protocol method: #method<connection.close>(reply-code=503, reply-text=COMMAND_INVALID - unknown exchange type 'x-delayed-message', class-id=40, method-id=10)
2019-09-24 13:05:30.145 ERROR 8444 --- [168.47.131:5672] o.s.a.r.c.CachingConnectionFactory : Channel shutdown: connection error; protocol method: #method<connection.close>(reply-code=503, reply-text=COMMAND_INVALID - unknown exchange type 'x-delayed-message', class-id=40, method-id=10)
2019-09-24 13:05:30.156 INFO 8444 --- [ntContainer#0-1] o.s.a.r.c.CachingConnectionFactory : Attempting to connect to: 192.168.47.131:5672
查看Linux下rabbitmq的安装插件:查找
rabbitmq_delayed_message_exchange
通过命令:rabbitmq-plugins list
此时并没有找到该插件;
附:rabbitmq 插件安装(官网)
下载对应版本,由于我的rabbitmq是3.6.5,所以我安装3.6.x版本;
下载的压缩包:
解压后:后缀的.ez
将插件上传到Linux系统rabbitmq插件目录中,我上面通过ps -ef | grep rabbitmq 命令,已经找到了/usr/lib/rabbitmq/lib/rabbitmq_server-3.6.5/plugins,因此我放在plugins目录下即可。
然后开启rabbitmq_delayed_message_exchange插件
rabbitmq-plugins enable rabbitmq_delayed_message_exchange
再次启动项目,并无报错信息。