Docker安装RabbitMq延迟队列插件

// todo

文章目录

    • 一:下载延迟队列插件
      • 1. 地址
      • 2. 把刚刚下载的插件拖拽至虚拟机中
    • 二: 进入容器执行延迟队列插件
      • 1. 延迟插件拷贝到容器内部
      • 2. 进入容器,让插件生效
      • 3. 再次查看交换机类型

一:下载延迟队列插件

1. 地址

:https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases
Docker安装RabbitMq延迟队列插件_第1张图片

进入rabbit客户端,可以看见交换机没有延迟类型

Docker安装RabbitMq延迟队列插件_第2张图片

2. 把刚刚下载的插件拖拽至虚拟机中

Docker安装RabbitMq延迟队列插件_第3张图片

二: 进入容器执行延迟队列插件

1. 延迟插件拷贝到容器内部

docker cp rabbitmq_delayed_message_exchange-3.11.1.ez rabbitmq:/plugins

2. 进入容器,让插件生效

docker exec -it 4dba2864f3dd /bin/bash
rabbitmq-plugins enable rabbitmq_delayed_message_exchange
[root@master01 rabbit]# docker cp rabbitmq_delayed_message_exchange-3.11.1.ez rabbitmq:/plugins
[root@master01 rabbit]# docker ps
CONTAINER ID   IMAGE                 COMMAND                  CREATED        STATUS          PORTS                                                                                                                                                 NAMES
4dba2864f3dd   rabbitmq:management   "docker-entrypoint.s…"   26 hours ago   Up 19 minutes   4369/tcp, 5671/tcp, 0.0.0.0:5672->5672/tcp, :::5672->5672/tcp, 15671/tcp, 15691-15692/tcp, 25672/tcp, 0.0.0.0:15672->15672/tcp, :::15672->15672/tcp   rabbitmq
8e35edc5a5e7   nacos/nacos-server    "bin/docker-startup.…"   2 days ago     Up 19 minutes   0.0.0.0:8848->8848/tcp, :::8848->8848/tcp                                                                                                             nacos
[root@master01 rabbit]# docker exec -it 4dba2864f3dd /bin/bash
root@4dba2864f3dd:/# ll
bash: ll: command not found
root@4dba2864f3dd:/# ls
bin  boot  dev  etc  home  lib  lib32  lib64  libx32  media  mnt  opt  plugins  pluginw  proc  root  run  sbin  srv  sys  tmp  usr  var
root@4dba2864f3dd:/# rabbitmq-plugins enable rabbitmq_delayed_message_exchange
Enabling plugins on node rabbit@4dba2864f3dd:
rabbitmq_delayed_message_exchange
The following plugins have been configured:
  rabbitmq_delayed_message_exchange
  rabbitmq_management
  rabbitmq_management_agent
  rabbitmq_prometheus
  rabbitmq_web_dispatch
Applying plugin configuration to rabbit@4dba2864f3dd...
The following plugins have been enabled:
  rabbitmq_delayed_message_exchange

started 1 plugins.
root@4dba2864f3dd:/#

3. 再次查看交换机类型

已经可以看到x-delayed-message延迟队列类型

Docker安装RabbitMq延迟队列插件_第4张图片

你可能感兴趣的:(mq,rabbitmq,docker,分布式)