docker-compose安装rabbitmq 并开启延迟队列和管理面板插件(rabbitmq_delayed_message_exchange)

问题:

解决rabbitmq-plugins enable rabbitmq_delayed_message_exchange

:plugins_not_found

我是在docker-compose环境部署的

bash 复制代码
services:
  rabbitmq:
    image: rabbitmq:4.0-management
    restart: always
    container_name: rabbitmq
    ports:
      - 5672:5672
      - 15672:15672
    environment:
      RABBITMQ_DEFAULT_USER: rabbit
      RABBITMQ_DEFAULT_PASS: 123456
    volumes:
      - ./rabbitmq/data:/var/lib/rabbitmq
      - ./rabbitmq/conf:/etc/rabbitmq
      - ./rabbitmq/plugins/rabbitmq_delayed_message_exchange-3.13.0.ez:/plugins/rabbitmq_delayed_message_exchange-3.13.0.ez
    networks:
      pay_net:
        ipv4_address: ${PY_SUBNET_PREFIX}.15

插件地址:
https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases

bash 复制代码
wget https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases/download/v3.13.0/rabbitmq_delayed_message_exchange-3.13.0.ez
bash 复制代码
root@a5fd210b7eb1:/plugins# rabbitmq-plugins enable rabbitmq_delayed_message_exchange-3.13.0.ez
Enabling plugins on node rabbit@a5fd210b7eb1:
rabbitmq_delayed_message_exchange-3.13.0.ez
Error:
{:plugins_not_found, [:"rabbitmq_delayed_message_exchange-3.13.0.ez"]}

解决步骤:

  1. 挂载进去后,到 rabbbitmq容器的 /opt/rabbitmq/sbin 目录下去
  2. 执行./rabbitmq-plugins enable rabbitmq_delayed_message_exchange
    而不是./rabbitmq-plugins enable rabbitmq_delayed_message_exchange-3.13.0.ez
bash 复制代码
root@a5fd210b7eb1:/opt/rabbitmq/sbin# ./rabbitmq-plugins enable rabbitmq_delayed_message_exchange-3.13.0.ez
Enabling plugins on node rabbit@a5fd210b7eb1:
rabbitmq_delayed_message_exchange-3.13.0.ez
Error:
{:plugins_not_found, [:"rabbitmq_delayed_message_exchange-3.13.0.ez"]}
root@a5fd210b7eb1:/opt/rabbitmq/sbin# ./rabbitmq-plugins enable rabbitmq_delayed_message_exchange
Enabling plugins on node rabbit@a5fd210b7eb1:
rabbitmq_delayed_message_exchange
The following plugins have been configured:
  rabbitmq_delayed_message_exchange
Applying plugin configuration to rabbit@a5fd210b7eb1...
The following plugins have been enabled:
  rabbitmq_delayed_message_exchange

started 1 plugins.
root@a5fd210b7eb1:/opt/rabbitmq/sbin# pwd
/opt/rabbitmq/sbin

management

bash 复制代码
root@a5fd210b7eb1:/opt/rabbitmq/sbin# ./rabbitmq-plugins enable rabbitmq_management
Enabling plugins on node rabbit@a5fd210b7eb1:
rabbitmq_management
The following plugins have been configured:
  rabbitmq_delayed_message_exchange
  rabbitmq_management
  rabbitmq_management_agent
  rabbitmq_web_dispatch
Applying plugin configuration to rabbit@a5fd210b7eb1...
The following plugins have been enabled:
  rabbitmq_management
  rabbitmq_management_agent
  rabbitmq_web_dispatch

started 3 plugins.
相关推荐
新知图书8 分钟前
Hadoop完全分布式环境搭建步骤
大数据·hadoop·分布式
zmd-zk1 小时前
[spark面试]spark与mapreduce的区别---在DAG方面
大数据·分布式·面试·spark·mapreduce
java1234_小锋1 小时前
讲讲 kafka 维护消费状态跟踪的方法?
分布式·kafka
明达技术1 小时前
MR30分布式IO模块与高效PLC协同
分布式·物联网·自动化
紫晓宁3 小时前
jmeter结合ansible分布式压测--1数据准备
分布式·jmeter·ansible
FakeOccupational3 小时前
【p2p、分布式,区块链笔记 Torrent】WebTorrent的add和seed函数
笔记·分布式·p2p
The Open Group4 小时前
企业如何通过架构蓝图实现数字化转型
大数据·人工智能·分布式·微服务·云原生·架构·数字化转型
MoCrane4 小时前
【分布式】分布式锁设计与Redisson源码解析
分布式
李逍遙️4 小时前
Redisson实现分布式锁
spring boot·分布式·redisson
小笨猪-4 小时前
RabbitMQ应用问题
java·redis·分布式·rabbitmq