A, RabbitMQ Profile
RabbitMQ belonging to a popular open source system message queue. Belonging to the AMQP (Advanced Message Queuing Protocol) to achieve a standard. It is an open standard application-layer protocol for message-oriented middleware design. In a distributed system for store and forward messages, in terms of ease of use, scalability, high availability, and so doing well.
Two, RabbitMQ works
MQ consumption - a model representative of typical producer, end to continue to write messages in the message queue, and the other end can be read or subscribe to messages in the queue. MQ is a concrete follow AMQP protocol implementations and products. In the project, without some return immediately extracted and time-consuming operation, made asynchronous processing, and this processing asynchronous requests greatly saving server response time, thereby increasing the throughput of the system.
1, the client connects to the server message queue, to open a channel.
2, a client statement exchange, and provision of the relevant property.
3, the client declare a queue, and set the associated property.
4, the client uses routing key, establish a good relationship between the exchange and the binding queue.
5, the client message delivery to the exchange.
6, after receiving the message exchange, according to the message and key binding has been set, route messages, the message delivered to one or more queue
Third, the deployment RabbitMQ cluster
1> All machines have been installed
yum install -y erlang rabbitmq-server.noarch
2> All Start
Whether 3> View start-up state starts
4> to view the listening port
5> lichaohsot1: edit rabbittmq variable file
vim /etc/rabbitmq/rabbitmq-env.conf
# Edit content follows
RABBITMQ_NODE_PORT=5672 limit -S -n 4096 RABBITMQ_SERVER_ERL_ARGS="+K true +A30 +P 1048576 -kernel inet_default_connect_options [{nodelay,true},{raw,6,18,<<5000:64/native>>}] -kernel inet_default_listen_options [{raw,6,18,<<5000:64/native>>}]" RABBITMQ_NODE_IP_ADDRESS=192.168.206.137
6> be sent to two other machines and modifications ip
#1
#2
# 3 modification
# 4 modified
7> all machines open web management page of rabbitmq
rabbitmq-plugins enable rabbitmq_management
8> access the web interface
web interface port number: 15672
9> Enter the account password and log (the default is guest)
10> lichaohost1 erlang.cookie sent to another node cluster configuration
12> lichaohost2 lichaohost3 and stop the application, and in a manner ram added lichaohost1 node, and restart the application
systemctl restart rabbitmq-server.service rabbitmqctl stop_app rabbitmqctl join_cluster --ram rabbit@lichaohost1 rabbitmqctl start_app
#
13> lichaohost1 View cluster status
14> web interface login verification
15> openstack add a user, and the password is admin. And set permissions and become an administrator
#1
rabbitmqctl add_user openstack admin (add users)
#2
set_permissions OpenStack rabbitmqctl " . * " " . * " " . * " (set permissions)
#3
rabbitmqctl set_user_tags openstack administrator (set to administrator)
16> Login Test
#