Getting started with Rabbit MQ
Messaging with Rabbit MQ
- Robust messaging for applications
- Easy to use
- Runs on all major operating systems
- Supports a huge number of developer platforms
- Open source and commercially supported
In order to build an application that can use Rabbit MQ, you have to download and install Rabbit MQ server. It's a service platform with a web server to check the traffic and all events. The installation seems an easy step but for me it wasn't so easy. I have followed these steps to get all working. With this command on Linux, you can download and install the service:
sudo apt-get install rabbitmq-server
Start the server:
sudo /etc/init.d/rabbitmq-server start
Now the server is running. Just run the same command with stop instead of start to stop the service.
RABBIT MQ ADMIN
Interact with the web server on your browser: http://localhost:15672/. Here you can obtain the executable python file going to http://localhost:15672/cli/. Download the txt file and move it to /usr/local/bin/:
sudo mv rabbitmqadmin.py /usr/local/bin/
You can rename the .py file to rabbitmqadmin without extension. In this way, when you will type rabbitmqadmin, you will simply have the command.
Tutorials with source files are available on the website but I suggest to clone or download the github repository with all files for all available programming languages. Here we can see how to interact with Rabbit MQ and read the tutorials on the website to understand how Rabbit MQ really works.
The next step
Now we have seen how the system can easily receive messages in real time. The next step can be to build a web application that can able to push messages and receive them in real time using NodeJS and a library like socket.io.