View gist:56acc6f7cb9c5fdf06dd9516a43cdbed
#/bin/bash
# these action should be run with sudo level
# activate management plugin first
rabbitmq-plugins enable rabbitmq_management
# restart the rabbitmq-server
service rabbitmq-server restart
# download the rabbitmqadmin script locally
View Create Rabbitmq Admin and Create queue
1. Create account admin
sudo rabbitmqctl add_user test test
sudo rabbitmqctl set_user_tags test administrator
sudo rabbitmqctl set_permissions -p / test ".*" ".*" ".*"
2. Declare Queue
sudo rabbitmqadmin declare queue name=my-new-queue durable=true
3. Publish message to queue
sudo rabbitmqadmin publish routing_key="queue" payload="hello, world"