安装Rabbitmq
#拉取镜像
[root@localhost ~]# docker pull rabbitmq:3.7-management
#启动一个容器
[root@localhost ~]# docker run -d --name rabbit -p 15672:15672 -p 5672:5672 rabbitmq:3.7-management
浏览器访问 ip:15672,容器已经运行
默认用户/密码guest/guest
安装延迟队列插件
下载rabbitmq-delayed-message-exchange rabbitmq-delayed-message-exchange v3.8.0.ez
上传至服务器 /home
#拷贝到rabbitmq容器 rabbit 中
[root@localhost ~]# docker cp /home/rabbitmq_delayed_message_exchange-3.8.0.ez rabbit:/plugins
#进入容器
[root@localhost ~]# docker exec -it rabbit /bin/bash
#启用插件
root@a3223185cac7:/# rabbitmq-plugins enable rabbitmq_delayed_message_exchange
#查看现有插件已显示rabbitmq_delayed_message_exchange安装
root@a3223185cac7:/# rabbitmq-plugins list
Listing plugins with pattern ".*" ...
Configured: E = explicitly enabled; e = implicitly enabled
| Status: * = running on rabbit@a3223185cac7
|/
[ ] rabbitmq_amqp1_0 3.7.28
[ ] rabbitmq_auth_backend_cache 3.7.28
[ ] rabbitmq_auth_backend_http 3.7.28
[ ] rabbitmq_auth_backend_ldap 3.7.28
[ ] rabbitmq_auth_mechanism_ssl 3.7.28
[ ] rabbitmq_consistent_hash_exchange 3.7.28
[E*] rabbitmq_delayed_message_exchange 3.8.0
[ ] rabbitmq_event_exchange 3.7.28
[ ] rabbitmq_federation 3.7.28
[ ] rabbitmq_federation_management 3.7.28
[ ] rabbitmq_jms_topic_exchange 3.7.28
[E*] rabbitmq_management 3.7.28
[e*] rabbitmq_management_agent 3.7.28
[ ] rabbitmq_mqtt 3.7.28
[ ] rabbitmq_peer_discovery_aws 3.7.28
[ ] rabbitmq_peer_discovery_common 3.7.28
[ ] rabbitmq_peer_discovery_consul 3.7.28
[ ] rabbitmq_peer_discovery_etcd 3.7.28
[ ] rabbitmq_peer_discovery_k8s 3.7.28
[ ] rabbitmq_random_exchange 3.7.28
[ ] rabbitmq_recent_history_exchange 3.7.28
[ ] rabbitmq_sharding 3.7.28
[ ] rabbitmq_shovel 3.7.28
[ ] rabbitmq_shovel_management 3.7.28
[ ] rabbitmq_stomp 3.7.28
[ ] rabbitmq_top 3.7.28
[ ] rabbitmq_tracing 3.7.28
[ ] rabbitmq_trust_store 3.7.28
[e*] rabbitmq_web_dispatch 3.7.28
[ ] rabbitmq_web_mqtt 3.7.28
[ ] rabbitmq_web_mqtt_examples 3.7.28
[ ] rabbitmq_web_stomp 3.7.28
[ ] rabbitmq_web_stomp_examples 3.7.28
#重新启动容器
[root@localhost ~]# docker restart rabbit