Rabbitmq is a free and open source message broker system that implements the Advanced Message Queuing Protocol (AMQP). It is also known as message-oriented middleware written in the Erlang programming language and built on the Open Telecom Platform framework for clustering and failover.
Rabbitmq is a scalable implementation of an AMQP broker. AMQP is the most widely used open-source standard for distributing and transferring messages from a source to a destination.
The Rabbitmq message broker system provides lot's of features some of them are listed below:
Supports multiple protocols such as MQTT, STOMP and HTTP.
Supports routing capabilities, you can implement rules to route messages between exchanges and queues.
Supports multiple programming language with a variety of supported clients.
Supports clustering, so you can clustered several rabbinmq server on local network.
Supports high availability, so if a broker fails then communication will be redirected to different broker instance.
Provides user friendly web interface to monitor and control every aspect of your message broker.
Rabbitmq comes with lot's of plugins, you can easily extend it and also write your own.
Rabbitmq provides tracing features that can be used to find out what's going on.
In this tutorial, we will learn how to install rabbitmq on Ubuntu 16.04 server.
A server running Ubuntu 16.04.
A non-root user with sudo privileges configure on your server.
Before starting, you will need to update Ubuntu repository with the latest one.
You can do this by running the following commands:
sudo apt-get update -ysudo apt-get upgrade -y
Before installing rabbitmq, you will need to install erlang as a prerequisite of rabbitmq. You can install them by running the following commands:
You can check the status of rabbitmq server with the following command:
sudo systemctl status rabbitmq-server
RabbitMQ comes with default built-in settings which will quite likely be sufficient for running your RabbitMQ server effectively. If it runs fine, then you possibly don't need any configuration at all.
There are three way to customize RabbitMQ server.
You can define ports, file location and names using environment variable file.
You can defines server component settings for permissions, limits and clusters using configuration file.
runtime parameters and policies
You can defines cluster-wide settings which can change at run time .
You can find location of configuration file by inspecting RabbitMQ log file.
If you want to manage the maximum amount of connections upon launch, then you will need to modify rabbitmq-server file located at /etc/default/ directory.
sudo nano /etc/default/rabbitmq-server
Find the line that containing word ulimit and uncomment it:
ulimit -n 1024
Save and close the file, then you can proceed to next step.
Allow RabbitMQ Through Firewall
By default RabbitMQ web management console runs on port 15672. So you will need to allow this port through UFW firewall. By default UFW firewall is disabled in Ubuntu 16.04, so you will need to enable it first.
You can enable UFW filrewall with the following command:
sudo ufw enable
Once UFW is enabled, allow port 15672 using the following command:
sudo ufw allow 15672
Once you are done, you can proceed to next step.
Accessing RabbitMQ Web Management Console
Once everything is setup properly, it's time to access Rabbitmq web management console.
Before starting, you will need to install rabbitmq web management plugin first. You can easily manage and monitor your RabbitMQ server in a variety of ways using this plugin.
Using this console, you can manage queues, bindings and users, monitor queues, message rates, connections and also monitor Erlang processes, memory usage etc.
To install this plugin simply run the following command:
sudo rabbitmq-plugins enable rabbitmq_management
The above command will enable the following plugins:
Once the plugin is enabled, you will need to restart rebbitmq service for the changes to come into effect.
Next, you will also need to create new admin user.
You can create a new admin user with the following commands:
Finally, you have successfully installed RabbitMQ server on Ubuntu 16.04. You can now easily manage your RabbitMQ server from your web.
In this tutorial, you have learn how to install RabbitMQ server on Ubuntu 16.04 server. You have also learned how to enable the RabbitMQ web management plugins. I hope, you can now easily deploy RabbitMQ server in production environment.
Looking for the right web hosting solution for your website can be an intimidating task. Options nowadays are more diversified than ever, and each year brings new developments in the web hosting market. If you have no clue of what to look out for, you can find yourself overwhelmed with...
Content marketing continues to be one of the most valuable tools for today’s online businesses. With content, you can improve your chances of reaching your target audience, boost your search engine standing, and even unlock new opportunities for sales. The more content you produce, the more you can strengthen your...
User Experience (UX) is one of the most crucial factors to consider in web design. As the number of websites and applications in the world today continues to accelerate, businesses are under more pressure than ever to impress customers straight away. If a user visits your website and finds slow-loading...