Setup RabbitMQ on Ubuntu in Azure/AWS/GCP

Setup and install RabbitMQ on Ubuntu 24.04 on Azure, AWS or Google GCP.  RabbitMQ is an open-source message broker software that implements the Advanced Message Queuing Protocol (AMQP). It allows applications to communicate with each other through messaging, ensuring reliable and asynchronous data exchange. 

Cloud RabbitMQ on Ubuntu 24.04

Setup RabbitMQ on Azure

RabbitMQ Azure

Deploy RabbitMQ on Ubuntu 24.04 on Azure

Setup RabbitMQ on AWS

RabbitMQ AWS

Deploy RabbitMQ on Ubuntu 24.04 on AWS

Setup RabbitMQ on GCP

RabbitMQ GCP

Deploy RabbitMQ on Ubuntu 24.04 on GCP

Getting Started with RabbitMQ on Ubuntu

Once your RabbitMQ server has been deployed, the following links explain how to connect to a Linux VM:

 

 

Once connected and logged in, the following section explains how to start using RabbitMQ on Ubuntu. 

Step 1: Access RabbitMQ Management Interface

Enable RabbitMQ Management Plugin

First, enable the RabbitMQ management plugin, which provides an HTTP-based API for managing RabbitMQ.

				
					sudo rabbitmq-plugins enable rabbitmq_management

				
			

Restart RabbitMQ Service

Restart the RabbitMQ service to apply the changes.

				
					sudo systemctl restart rabbitmq-server

				
			

Access the Management Interface

Open your web browser and navigate to http://localhost:15672.

 

If you are accessing RabbitMQ on a remote server, replace localhost with the server’s IP address.

Step 2: Login to RabbitMQ Management Interface

Default Credentials

The default username and password for RabbitMQ are:

 

  • Username: guest
  • Password: guest

 

The default credentials only work if logging in locally. Enter these credentials in the login form on the RabbitMQ management interface.

Create RabbitMQ Users

To create a new RabbitMQ user that will allow you to login remotely, enter the following on your command line. Replace admin with your desired username and password with your desired password.:

				
					sudo rabbitmqctl add_user admin password
				
			
				
					sudo rabbitmqctl set_user_tags admin administrator
				
			
				
					sudo rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"
				
			

You can now login using these new credentials to the RabbitMQ management dashboard

Step 3: Using RabbitMQ Management Interface

Once logged in, you will see the RabbitMQ management dashboard, which includes several tabs:

 

  1. Overview: The overview tab shows general information about RabbitMQ, such as the number of nodes, connections, channels, and queues.
  2. Connections: This tab lists all the active connections to the RabbitMQ server. You can view details about each connection and close connections if necessary.
  3. Channels: Channels are virtual connections inside a connection. This tab shows all active channels and their status.
  4. Exchanges: Exchanges are message routing components. This tab shows all exchanges, and you can create, delete, or configure exchanges.
  5. Queues: Queues store and forward messages to consumers. This tab shows all queues, and you can create, delete, or configure queues.
  6. Admin: The admin tab allows you to manage users, virtual hosts, permissions, and policies. You can add new users, set permissions, and manage virtual hosts.

RabbitMQ Firewall Ports

RabbitMQ uses several ports for different purposes. Here are the primary ports you need to be aware of:

 

AMQP 0-9-1 and 1.0 (TCP 5672)

  • This is the main port used by RabbitMQ for AMQP (Advanced Message Queuing Protocol) communication.


RabbitMQ Management (HTTP 15672)

  • This port is used for the RabbitMQ Management Plugin, which provides a web-based interface.


RabbitMQ Management HTTPS (HTTPS 15671)

  • If you enable SSL for the management interface, this port will be used instead of 15672.


Erlang Distribution (TCP 25672)

  • This port is used for communication between RabbitMQ nodes and CLI tools. The port number is computed as 25672 + the value of

RABBITMQ_DIST_PORT_RANGE.

 

STOMP (TCP 61613 & 61614)

  • If you use the STOMP plugin, these ports are used for STOMP communication (61613) and SSL communication (61614).

 

MQTT (TCP 1883 & 8883)

  • If you use the MQTT plugin, these ports are used for MQTT communication (1883) and SSL communication (8883).

 

Web MQTT (TCP 15675 & 15676)

  • If you use the Web MQTT plugin, these ports are used for Web MQTT communication (15675) and SSL communication (15676).

 

Prometheus Metrics (TCP 15692)

  • This port is used if you enable the Prometheus metrics plugin.

 

The links below explain how to modify / create firewall rules depending on which cloud platform you are using.

 

To setup AWS firewall rules refer to – AWS Security Groups

To setup Azure firewall rules refer to – Azure Network Security Groups

To setup Google GCP firewall rules refer to – Creating GCP Firewalls

RabbitMQ Support / Documentation

If you experience any issues on getting this RabbitMQ server setup on any of the cloud platforms, please contact us and we will assist.

 

For documentation, please refer to the following links:

https://www.rabbitmq.com/docs

 

Disclaimer: RabbitMQ is a registered trademark owned by Pivotal Software, Inc and is licensed under MOZILLA PUBLIC LICENSE V2.0 license. THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Avatar for Andrew Fitzgerald
Andrew Fitzgerald

Cloud Solution Architect. Helping customers transform their business to the cloud. 20 years experience working in complex infrastructure environments and a Microsoft Certified Solutions Expert on everything Cloud.

0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x