目的: 刚启用的 RabbitMQ 容器,发现没有rabbitmq_delayed_message_exchange
插件,开始手动安装
官网
https://www.rabbitmq.com/community-plugins
或
https://github.com/rabbitmq/rabbitmq-delayed-message-exchange
下载rabbitmq_delayed_message_exchange-4.0.2.ez
, 解压缩后目录是rabbitmq_delayed_message_exchange-4.0.2
查看 podman 虚拟机
podman machine list
输出
NAME VM TYPE CREATED LAST UP CPUS MEMORY DISK SIZE
podman-machine-default wsl 8 hours ago Currently running 8 2GiB 100GiB
进入默认 podman 虚拟机
podman machine ssh
查看 盘符映射
ls -asl /mnt
查看 虚拟机内 podman 容器
podman ps
输出
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
NAMES
045723fe3135 docker.io/library/rabbitmq:4-management rabbitmq-server 5 hours ago Up 5 hours 0.0.0.0:5672->5672/tcp, 0.0.0.0:15672->15672/tcp, 4369/tcp, 5671/tcp, 15671/tcp, 15691-15692/tcp, 25672/tcp rabbitmq
复制文件
我的文件是在d
盘 work
目录下rabbitmq_delayed_message_exchange-4.0.2
那么 在 虚拟机内的目录是 /mnt/d/work/rabbitmq_delayed_message_exchange-4.0.2
podman cp /mnt/d/work/rabbitmq_delayed_message_exchange-4.0.2 045723fe3135:/opt/rabbitmq/plugins/
进入容器内
podman exec -it rabbitmq bash
查看
cd /opt/rabbitmq/plugins/
ls -asl
输出
README rabbit-4.0.5 rabbitmq_recent_history_exchange-4.0.5
accept-0.3.5 rabbit_common-4.0.5 rabbitmq_sharding-4.0.5
amqp10_client-4.0.5 rabbitmq_amqp1_0-4.0.5 rabbitmq_shovel-4.0.5
amqp10_common-4.0.5 rabbitmq_auth_backend_cache-4.0.5 rabbitmq_shovel_management-4.0.5
amqp_client-4.0.5 rabbitmq_auth_backend_http-4.0.5 rabbitmq_shovel_prometheus-4.0.5
aten-0.6.0 rabbitmq_auth_backend_ldap-4.0.5 rabbitmq_stomp-4.0.5
base64url-1.0.1 rabbitmq_auth_backend_oauth2-4.0.5 rabbitmq_stream-4.0.5
cowboy-2.12.0 rabbitmq_auth_mechanism_ssl-4.0.5 rabbitmq_stream_common-4.0.5
cowlib-2.13.0 rabbitmq_aws-4.0.5 rabbitmq_stream_management-4.0.5
credentials_obfuscation-3.4.0 rabbitmq_consistent_hash_exchange-4.0.5 rabbitmq_top-4.0.5
cuttlefish-3.4.0 rabbitmq_event_exchange-4.0.5 rabbitmq_tracing-4.0.5
eetcd-0.3.6 rabbitmq_federation-4.0.5 rabbitmq_trust_store-4.0.5
enough-0.1.0 rabbitmq_federation_management-4.0.5 rabbitmq_web_dispatch-4.0.5
gen_batch_server-0.8.8 rabbitmq_federation_prometheus-4.0.5 rabbitmq_web_mqtt-4.0.5
getopt-1.0.3 rabbitmq_jms_topic_exchange-4.0.5 rabbitmq_web_mqtt_examples-4.0.5
gun-1.3.3 rabbitmq_management-4.0.5 rabbitmq_web_stomp-4.0.5
horus-0.3.1 rabbitmq_management_agent-4.0.5 rabbitmq_web_stomp_examples-4.0.5
jose-1.11.10 rabbitmq_mqtt-4.0.5 ranch-2.1.0
khepri-0.16.0 rabbitmq_peer_discovery_aws-4.0.5 recon-2.5.6
khepri_mnesia_migration-0.7.1 rabbitmq_peer_discovery_common-4.0.5 redbug-2.1.0
oauth2_client-4.0.5 rabbitmq_peer_discovery_consul-4.0.5 seshat-0.6.1
amqp_client-4.0.5 rabbitmq_auth_backend_ldap-4.0.5 rabbitmq_stomp-4.0.5
aten-0.6.0 rabbitmq_auth_backend_oauth2-4.0.5 rabbitmq_stream-4.0.5
base64url-1.0.1 rabbitmq_auth_mechanism_ssl-4.0.5 rabbitmq_stream_common-4.0.5
cowboy-2.12.0 rabbitmq_aws-4.0.5 rabbitmq_stream_management-4.0.5
cowlib-2.13.0 rabbitmq_consistent_hash_exchange-4.0.5 rabbitmq_top-4.0.5
credentials_obfuscation-3.4.0 rabbitmq_delayed_message_exchange-4.0.2 rabbitmq_tracing-4.0.5
cuttlefish-3.4.0 rabbitmq_event_exchange-4.0.5 rabbitmq_trust_store-4.0.5
eetcd-0.3.6 rabbitmq_federation-4.0.5 rabbitmq_web_dispatch-4.0.5
enough-0.1.0 rabbitmq_federation_management-4.0.5 rabbitmq_web_mqtt-4.0.5
gen_batch_server-0.8.8 rabbitmq_federation_prometheus-4.0.5 rabbitmq_web_mqtt_examples-4.0.5
getopt-1.0.3 rabbitmq_jms_topic_exchange-4.0.5 rabbitmq_web_stomp-4.0.5
gun-1.3.3 rabbitmq_management-4.0.5 rabbitmq_web_stomp_examples-4.0.5
horus-0.3.1 rabbitmq_management_agent-4.0.5 ranch-2.1.0
jose-1.11.10 rabbitmq_mqtt-4.0.5 recon-2.5.6
khepri-0.16.0 rabbitmq_peer_discovery_aws-4.0.5 redbug-2.1.0
khepri_mnesia_migration-0.7.1 rabbitmq_peer_discovery_common-4.0.5 seshat-0.6.1
oauth2_client-4.0.5 rabbitmq_peer_discovery_consul-4.0.5 stdout_formatter-0.2.4
observer_cli-1.7.5 rabbitmq_peer_discovery_etcd-4.0.5 syslog-4.0.0
osiris-1.8.5 rabbitmq_peer_discovery_k8s-4.0.5 sysmon_handler-1.3.0
prometheus-4.11.0 rabbitmq_prelaunch-4.0.5 systemd-0.6.1
quantile_estimator-0.2.1 rabbitmq_prometheus-4.0.5 thoas-1.2.1
ra-2.14.0 rabbitmq_random_exchange-4.0.5
rabbit-4.0.5 rabbitmq_recent_history_exchange-4.0.5
启用插件
rabbitmq-plugins enable rabbitmq_delayed_message_exchange
查看插件是否启用
Listing plugins with pattern ".*" ...
Configured: E = explicitly enabled; e = implicitly enabled
| Status: * = running on rabbit@045723fe3135
|/
[ ] rabbitmq_amqp1_0 4.0.5
[ ] rabbitmq_auth_backend_cache 4.0.5
[ ] rabbitmq_auth_backend_http 4.0.5
[ ] rabbitmq_auth_backend_ldap 4.0.5
[ ] rabbitmq_auth_backend_oauth2 4.0.5
[ ] rabbitmq_auth_mechanism_ssl 4.0.5
[ ] rabbitmq_consistent_hash_exchange 4.0.5
[E*] rabbitmq_delayed_message_exchange 4.0.2
[ ] rabbitmq_event_exchange 4.0.5
[ ] rabbitmq_federation 4.0.5
[ ] rabbitmq_federation_management 4.0.5
[ ] rabbitmq_federation_prometheus 4.0.5
[ ] rabbitmq_jms_topic_exchange 4.0.5
[E*] rabbitmq_management 4.0.5
[e*] rabbitmq_management_agent 4.0.5
[ ] rabbitmq_mqtt 4.0.5
[ ] rabbitmq_peer_discovery_aws 4.0.5
[ ] rabbitmq_peer_discovery_common 4.0.5
[ ] rabbitmq_peer_discovery_consul 4.0.5
[ ] rabbitmq_peer_discovery_etcd 4.0.5
[ ] rabbitmq_peer_discovery_k8s 4.0.5
[E*] rabbitmq_prometheus 4.0.5
[ ] rabbitmq_random_exchange 4.0.5
[ ] rabbitmq_recent_history_exchange 4.0.5
[ ] rabbitmq_sharding 4.0.5
[ ] rabbitmq_shovel 4.0.5
[ ] rabbitmq_shovel_management 4.0.5
[ ] rabbitmq_shovel_prometheus 4.0.5
[ ] rabbitmq_stomp 4.0.5
[ ] rabbitmq_stream 4.0.5
[ ] rabbitmq_stream_management 4.0.5
[ ] rabbitmq_top 4.0.5
[ ] rabbitmq_tracing 4.0.5
[ ] rabbitmq_trust_store 4.0.5
[e*] rabbitmq_web_dispatch 4.0.5
[ ] rabbitmq_web_mqtt 4.0.5
[ ] rabbitmq_web_mqtt_examples 4.0.5
[ ] rabbitmq_web_stomp 4.0.5
[ ] rabbitmq_web_stomp_examples 4.0.5
安装 rabbitmq
podman run -itd --name=rabbitmq \
-p 15672:15672 \
-p 5672:5672 \
-e RABBITMQ_DEFAULT_USER=admin \
-e RABBITMQ_DEFAULT_PASS=admin \
rabbitmq:4-management
-itd:以交互模式启动容器并在后台运行。
–name=rabbitmq:为容器指定一个名称。
-v /d/docker/rabbitmq:/var/lib/rabbitmq:目录挂载
-p 15672:15672:管理端口
-p 5672:5672:消息接收端口
-e RABBITMQ_DEFAULT_USER=admin:用户名
-e RABBITMQ_DEFAULT_PASS=admin:密码