RabbitMQ Getting Started
RabbitMQ is the most widely deployed open source message broker. With more than 35,000 production deployments of RabbitMQ world-wide at small startups and large enterprises, RabbitMQ is the most popular open source message broker.
If you have installed Websoft9 RabbitMQ, the following steps is for your quick start
Preparation
- Get the Internet IP on your Cloud Platform
- Check your Inbound of Security Group Rule of Cloud Console to ensure the TCP:15672 is allowed
- Get default username and password of RabbitMQ
- Complete Five steps for Domain if you want to use Domain for RabbitMQ.
RabbitMQ Initialization
Steps for you
-
Using local Chrome or Firefox to visit the URL http://DNS:15672 or http://Internet IP:15672, you will enter installation wizard of RabbitMQ
-
Log in to RabbitMQ web console(Don't have password?)
-
Set you new password from: 【Users】>【Admin】>【Permissions】>【Update this user】
More useful RabbitMQ guide, please refer to RabbitMQ Documentation
Having trouble?
Below is for you to solve problem, and you can contact Websoft9 Support or refer to Troubleshoot + FAQ to get more.
RabbitMQ QuickStart
This task【receives/ delivers Messages】 is for your RabbitMQ QuickStart:
RabbitMQ Setup
The following is based on [RabbitMQ official documentation] (https://www.rabbitmq.com/documentation.html), distilling common operations for reference:
Create User
The user for RabbitMQ web console is also the user for RabbitMQ Server. You can use the default administrator user admin or create more by RabbitMQ web console
- Use you local Chrome or Firefox to visit URL: http://Internet IP:15672, login to RabbitMQ console
- Open the 【Admin】>【Add a user】
- Set your username, password and tag(Role for RabbitMQ)
Remote connection
You can use the local MQ tools to connect RabbitMQ server remote if you want. Following is using the QueueExplorer to describe the steps for connection:
- Download and install QueueExplorer
- Enable the TCP:5672 and TCP:15672 ports of your Security Group of your Cloud Platform
- Open the QueueExplorer, fill the your credentials for RabbitMQ
- Connect successfully
Config TLS/SSL
RabbitMQ config TLS/SSL, need following 4 steps:
- Install tls-gen
git clone https://github.com/michaelklishin/tls-gen tls-gen
cd tls-gen/basic
# private key password
make PASSWORD=bunnies
make verify
make info
ls -l ./result
cp -r result/ /etc/rabbitmq/ssl/
- Add follow content into
/etc/rabbitmq/rabbitmq.config
ssl_options.cacertfile = /etc/rabbitmq/ssl/ca_certificate.pem
ssl_options.certfile = /etc/rabbitmq/ssl/server_certificate.pem
ssl_options.keyfile = /etc/rabbitmq/ssl/server_key.pem
ssl_options.verify = verify_peer
ssl_options.fail_if_no_peer_cert = false
-
Restart RabbitMQ service
systemctl restart rabbitmq
-
Verification
rabbitmq-diagnostics listeners
Reference sheet
The below items and General parameter sheet is maybe useful for you manage RabbitMQ
Run docker ps
command, view all Containers when RabbitMQ is running:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9b2d4c09de70 rabbitmq:3.10-management "docker-entrypoint.s…" 37 minutes ago Up 37 minutes 0.0.0.0:4369->4369/tcp, :::4369->4369/tcp, 5671/tcp, 0.0.0.0:5672->5672/tcp, :::5672->5672/tcp, 15671/tcp, 15691-15692/tcp, 0.0.0.0:15672->15672/tcp, :::15672->15672/tcp, 25672/tcp rabbitmq
Path
RabbitMQ installation directory: * /data/apps/rabbitmq*
RabbitMQ configuration directory: /data/apps/rabbitmq/data/rabbitmq_config
RabbitMQ data directory: /data/apps/rabbitmq/data/rabbitmq_data
Port
Port | Use | Necessity |
---|---|---|
15672 | HTTP requests for RabbitMQ Console | Required |
5672 | RabbitMQ connect Port | Optional |
4369 | Erlang distribution | Optional |
Version
# RabbitMQ version
docker exec -i rabbitmq rabbitmqctl version
Service
sudo docker start | stop | restart | stats rabbitmq
CLI
# RabbitMQ CLI
docker exec -it rabbitmq rabbitmqctl