*All the comments are well appreciated *
So here we go, one more installation tutorial this time its none other than the great RABBITMQ :)
So to install rabbitmq on centos 6 please follow the below east steps.
So for some quick examples and all.
Check out these python examples from the following links. Python examples
and
Github After successfully installing rabbitmq, lets try to understand how it works.
So to install rabbitmq on centos 6 please follow the below east steps.
- Install the EPEL-6 yum repo which contains Erlang R14B with the following command. This step is only for centos 6.
- Install Erlang with the following command.
- Install RabbitMQ from RPM
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
yum install erlang
1.rpm --import http://www.rabbitmq.com/rabbitmq-signing-key-public.asc
2.rpm -Uvh http://www.rabbitmq.com/releases/rabbitmq-server/v3.1.4/rabbitmq-server-3.1.4-1.noarch.rpm
- To make it run as daemon run this
- To start the rabbit mq.
- To stop the rabbitmq
/sbin/chkconfig rabbitmq-server on
/etc/init.d/rabbitmq-server start
/etc/init.d/rabbitmq-server stop
So for some quick examples and all.
Check out these python examples from the following links. Python examples
and
Github After successfully installing rabbitmq, lets try to understand how it works.
- In this set up where you start your sever that system acts a broker. So all the message will go through this.
- So we have these exchange points to which queues are attached.
- In broker this exchange takes the incoming message and puts in the particular queue.
- Question is how exchange knows to which queue msg has to be enqueued? The answer is routing key.
- All the messages carry a routing key, and each queue can be associated with a particular routing key.
- So based on the routing key that msg will be enqueued to particular queue.(only exception is fanout[you ll come to knwo what is fanout])
- Direct exchange: Each queue will be binded to a different routing key. So any incoming msg will be enqueued to the queue whos routing key matches with the queues routing key.
- Fan out exchange: There queus are binded to the exchanges and the routing keys are optional. All the messages received by this exchange will be enqueued to all the queues regardless of routing keys.
- Topic exchange: This is like multicast.
- Headers exchange: I dont know much abt this :D .
Comments
Post a Comment