There is no wget and other commands in docker, first download the plugin manually
https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases/download/v3.8.0/rabbitmq_delayed_message_exchange-3.8.0.ez
Then copy it to docker
docker cp rabbitmq_delayed_message_exchange-3.8.0.ez 6a56b1871ee3:/home
In the docker container, find the path of the MQ plugin
Mine is / opt / rabbitmq / plugins, put it in
Then rabbitmq-plugins enable rabbitmq_delayed_message_exchange to be careful not to bring the version and .ez
Use the rabbitmq-plugins list command to view the installed plugins
OK
Test with java
Source address: https://github.com/qiaomengnan16/mq-delayed-test