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.
相关推荐
weisian1512 小时前
Redis篇--常见问题篇7--缓存一致性2(分布式事务框架Seata)
redis·分布式·缓存
不能只会打代码3 小时前
Java并发编程框架之综合案例—— 分布式日志分析系统(七)
java·开发语言·分布式·java并发框架
Elastic 中国社区官方博客3 小时前
如何通过 Kafka 将数据导入 Elasticsearch
大数据·数据库·分布式·elasticsearch·搜索引擎·kafka·全文检索
马剑威(威哥爱编程)4 小时前
分布式Python计算服务MaxFrame使用心得
开发语言·分布式·python·阿里云
学计算机的睿智大学生5 小时前
Hadoop的生态系统所包含的组件
大数据·hadoop·分布式
神秘打工猴7 小时前
Kafka 监控都有哪些?
分布式·kafka
Kobebryant-Manba8 小时前
kafka基本概念
分布式·学习·kafka
rainoway9 小时前
CRDT宝典 - yata算法
前端·分布式·算法
hanbarger9 小时前
分布式通信,微服务协调组件,zookeeper
分布式·zookeeper·中间件