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.
相关推荐
运维&陈同学2 小时前
【zookeeper01】消息队列与微服务之zookeeper工作原理
运维·分布式·微服务·zookeeper·云原生·架构·消息队列
时差9532 小时前
Flink Standalone集群模式安装部署
大数据·分布式·flink·部署
菠萝咕噜肉i2 小时前
超详细:Redis分布式锁
数据库·redis·分布式·缓存·分布式锁
只因在人海中多看了你一眼6 小时前
分布式缓存 + 数据存储 + 消息队列知识体系
分布式·缓存
zhixingheyi_tian8 小时前
Spark 之 Aggregate
大数据·分布式·spark
求积分不加C10 小时前
-bash: ./kafka-topics.sh: No such file or directory--解决方案
分布式·kafka
nathan052910 小时前
javaer快速上手kafka
分布式·kafka
谭震鸿13 小时前
Zookeeper集群搭建Centos环境下
分布式·zookeeper·centos
天冬忘忧18 小时前
Kafka 工作流程解析:从 Broker 工作原理、节点的服役、退役、副本的生成到数据存储与读写优化
大数据·分布式·kafka
IT枫斗者1 天前
如何解决Java EasyExcel 导出报内存溢出
java·服务器·开发语言·网络·分布式·物联网