RabbitMQ is one of the more popular message broker solutions in the market, offered with an open-source license (Mozilla Public License v1.1) as an implementation of Advanced Message Queuing Protocol. Developed using the Erlang language, it is actually relatively easy to use and get started. It was first published in early 2007 and has since seen an active development with its latest release being version 3.6.1 (March 2016).
How does it work?
RabbitMQ works by offering an interface, connecting message senders (Publishers) with receivers (Consumers) through an exchange (Broker) which distributes the data to relevant lists (Message Queues).
How is it different than the others?
RabbitMQ, unlike some other solutions, is a fully-fledged application stack (i.e. a message broker). It gives you all the tools you need to work with, instead of acting like a framework for you to implement your own. Being extremely popular, it is really easy to get going using RabbitMQ and to find answers to your questions online.
AMQP – Advanced Message Queuing Protocol
AMQP is a widely accepted open-source standard for distributing and transferring messages from a source to a destination. As a protocol and standard, it sets a common ground for various applications and message broker middlewares to interoperate without encountering issues caused by individually set design decisions.
Before start install, make sure your server is up2date. To update use
#yum update –y
Once you make sure server is up2date, install erlang using following commend
Erlang is the main dependency, which required for RabbitMQ.
For install erlang we need to enable third party remi package repositories, using follow commend
# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Now you can install erlang using yum,
# yum install erlang –y
Step 2: Install RabbitMQ-Sever
Once we install erlang, now we can install RabbitMQ
We can download latest RabbitMQ in follow link.. Download Link
Add the necessary public key for verification
# rpm –import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
# rpm –ivh rabbitmq-server-3.2.2-1.noarch.rpm
Step 3: Enabling Management Console
RabbitMQ management console allow you to monitor the server process In GUI
Using this console you can:
- Manage exchanges, queues, bindings, users
- Monitor queues, message rates, connections
- Send and receive messages
- Monitor Erlang processes, memory usage
- And much more
# rabbitmq-plugins enable rabbitmq_management
Once you enabled the management console, you can access it using http://(your-Server-IP):15672. You will get sample screen like below. For login use default username and Password – guest/guest
After Logged in
Step 4: Manage the RabbitMQ Service
To RabbitMQ start as a daemon by default
# chkconfig rabbitmq-server on
To start, stop and restart service
# /etc/init.d/rabbitmq-server start
# /etc/init.d/rabbitmq-server stop
# /etc/init.d/rabbitmq-server restart
To check status
# /etc/init.d/rabbitmq-server status
Step 5: Some useful Commends
Sample configuration Path
To check plugins List
To Add user in rabbitMQ, we can perform in CLI and GUI both,
# rabbitmqctl add_user foxer
# rabbitmqctl ser_user_tags foxer administrator
# rabbitmqctl set_permissions -p / foxer “.*” “.*” “.*”