下载rabbitmq镜像
docker pull rabbitmq:management
运行rabbitmq镜像
docker run -id --name=rabbitmq -p 5671:5671 -p 5672:5672 -p 4369:4369 -p 15671:15671 -p 15672:15672 -p 25672:25672 -e RABBITMQ_DEFAULT_USER=tom -e RABBITMQ_DEFAULT_PASS=tom rabbitmq:management
插件地址
根据登录界面的rabbitmq的展示的版本下载对应的插件版本,否则会提示
Enabling plugins on node rabbit@a71af206fb3d:
rabbitmq_delayed_message_exchange
Error:
Failed to enable some plugins:
rabbitmq_delayed_message_exchange:
Plugin doesn't support current server version. Actual broker version: "3.13.7", supported by the plugin: ["3.10.0-3.10.x"]
https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases
下载完延迟插件后
将此插件复制到容器里面的plugins目录
docker cp rabbitmq_delayed_message_exchange-3.13.0.ez rabbitmq:/plugins
进入rabbitmq容器
docker exec -it rabbitmq /bin/bash
执行如下命令启用插件
rabbitmq-plugins enable rabbitmq_delayed_message_exchange