docker rabbitmq安装延迟插件

首先,已经安装有rabbitmq 3.8.17 

 

 

 

1、下载插件

地址:https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/tags

 

 2、将下载的插件上传到容器中:/plugins

docker cp rabbitmq_delayed_message_exchange-3.8.17.8f537ac.ez rabbitmq:/plugins

3、进入容器查看插件是否上传成功
docker exec -it rabbitmq /bin/bash

查看插件是否存在

ls -l /plugins/rabbitmq_delayed_message_exchange*

 

 

4、启动插件

rabbitmq-plugins enable rabbitmq_delayed_message_exchange

 

 

5、重启容器

docker restart rabbitmq

6、登录web查看

找到ExchangesTab页。点击Add a new exchange,在Type里面查看是否有x-delayed-message选项,如果存在就代表插件安装成功

 

问题记录:如果是集群启动插件报错,将 RAM 类型的 node 改为 DISK 类型

rabbitmqctl stop_app

rabbitmqctl change_cluster_node_type disc

rabbitmqctl start_app

rabbitmq-plugins enable  rabbitmq_delayed_message_exchange


posted @ 2022-11-02 16:09  leihongnu  阅读(464)  评论(0编辑  收藏  举报