Rabbitmq 报错:reply-code=503, reply-text=COMMAND_INVALID - unknown exchange type 'x-delayed-message'
控制台报错信息:
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 插件安装(官网)
https://www.rabbitmq.com/community-plugins.html
下载对应版本,由于我的rabbitmq是3.6.5,所以我安装3.6.x版本;
然后开启rabbitmq_delayed_message_exchange插件
rabbitmq-plugins enable rabbitmq_delayed_message_exchange
再次启动项目,并无报错信息。
https://blog.csdn.net/qq_37495786/article/details/101279491
https://www.freesion.com/article/2427422019/
Error: Channel closed by server: 406 (PRECONDITION-FAILED) with message "PRECONDITION_FAILED - Invalid argument, 'x-delayed-type' must be an existing exchange type"
这个问题困扰我了一会儿,详情可见 Github Issues rabbitmq-delayed-message-exchange/issues/19,正确操作如下图所示: