How to Install RabbitMQ on Windows Server 2016/2019/2022. In recent times top companies prefer to install a software that works as a messenger without additional charge. There is one particular tool that offers unlimited message sending services within the organizations, popularly known as “RabbitMQ“.
What is RabbitMQ?
RabbitMQ is a widely used open source message broker software application. The RabbitMQ software is built on the advanced message queuing protocol and extended by using plug in architecture to support streaming text oriented messenger services throughout the business organizations. It provides a common platform to send and receive a message and also facilitates encryption services to maintain confidentiality. RabbitMQ is mainly used by large companies within the industries, an example for the companies which have already adopted RabbitMQ applications are Zalando, Boomerang, WeWork, WunderList, and many more.
The RabbitMQ is written using the Erlang programming language, the RabbitMQ server is built based on the “Open telecom platform framework” for clustering message requests from the client. The RabbitMQ executable source codes are released under “Mozilla Public license”.
in the Article How to Install RabbitMQ on Windows Server 2016/2019/2022 let’s explain how the RabbitMQ software sends and receives messages within the organizations. Here is an image that illustrates the overview of the RabbitMQ:
The important factors that will explain the overall workflow of the RabbitMQ:
In the above figure, RabbitMQ acts as a middleware for various services like Web Applications, API Applications, etc. They can also be used to reduce the data load and delivery times of the web applications while taking up the resources from third parties.
In this example, we have taken an example of a web application that allows users to upload information to the websites. Later on, a piece of uploaded information will be generated in the form of a PDF and emailed back to the users. This kind of task required a lot of time while exchanging the information and generating them in PDF formats, so to overcome this issue, a message queue will be used.
The basic architecture of the RabbitMQ is very simple, the client side application is called a “producer” that creates messages, then delivers these messages into the “broker”. The server side application is known as a “consumer” that connects to the queue and is subscribed to get proceeds.
All the messages are placed onto a “queue” that is stored until the consumer retrieves them to perform further tasks.
Most of the time, when you consider sending messages, that will be going to exchange, and exchange pushes all these messages to multiple queues. This enables users to get a message from queues where it gets bonded.
Instead of publishing all the received messages directly into the queue, producers will come up to exchange messages.
An exchange messenger accepts the PDF format messages from the producers and routes them into the PDF creations or performs corrections.
Now the exchange delivers messages to the message queues with the help of exchange types.
There are three types of message exchanges available: Direct, Fanout, and topic.
The fanout message type just broadcasts all the messages it received to the known queues. And most of the time it ignores the binding values since it has to forward all the messages to queues that are shown in the below diagram:
In a direct message, a message goes directly to the queue whose binding key matches with the routing key of the message. In the fanout the binding value will be null since the exchange delivers messages to all the queues as shown below:
In this example, if the message published to exchange is with the routing key (that can be indicated in “orange” color), it will be first delivered only to the first Q1 (like FIRST IN FIRST OUT) whose binding key matches the routing key (indicated in blue color).
Topic message type works the same as direct message but the difference is that “routing key can be used based on multiple criteria”. Consider the below example:
Where
* indicates exactly one word,
# indicates zero or more words.
In the next section of how to install the RabbitMQ server on Windows server 2016/2019/2022, we will explain about how to install Erlang on Windows.
RabbitMQ runs on Erlang Virtual Machine. So you will need to install the Erlang package before installing RabbitMQ. Follow the below steps to install the Erlang on Windows:
Step 1 – Go to the Erlang download page and download it to your Windows system.
Step 2 – Once the download is completed, double click on the downloaded installer to start the installation. You should see the Erlang component selection page:
Step 3 – Click on the Next button. You should see the Erlang installation location selection page:
Step 4 – Choose your location and click on the Next button. You should see the start menu selection page:
Step 5 – Select your start menu folder and click on the Install button. You should see the Microsoft license term page:
Step 6 – Accept the license term and click on the Install button. Once all the Microsoft components are installed, you should see the following page:
Step 7 – Click on the Close button to start the Erlang installation. Once the Erlang is installed, you should see the following page:
Step 8 – Click on the Close button to finish the installation.
RabbitMQ provides a web based interface to manage and monitor the server. But, it is disabled by default. You can enable it by running the following command:
rabbitmq-plugins enable rabbitmq_management
You will get the following output:
Enabling plugins on node rabbit@CLOUD-OKTCGM1OC:
rabbitmq_management
The following plugins have been configured:
rabbitmq_management
rabbitmq_management_agent
rabbitmq_web_dispatch
Applying plugin configuration to rabbit@CLOUD-OKTCGM1OC...
The following plugins have been enabled:
rabbitmq_management
rabbitmq_management_agent
rabbitmq_web_dispatch
started 3 plugins.
How to Install RabbitMQ on Windows Server 2016/2019/2022 Conclusion
Congratulations! you have successfully installed the RabbitMQ server on Windows server 2016/2019/2022. I hope you have now enough knowledge to deploy the RabbitMQ server on the production environment.
I am a fan of open source technology and have more than 10 years of experience working with Linux and Open Source technologies. I am one of the Linux technical writers for Cloud Infrastructure Services.