Brief introduction
MQ is all called the message queue, and Message Queuing (MQ) is an application-to-application communication method. Applications communicate by reading and writing messages to and from the queue (data for the application), without requiring a dedicated connection to link them. Message passing refers to the process of communicating between programs by sending data in a message, rather than by directly invoking each other, and directly invoking techniques such as remote procedure calls. Queuing refers to an application communicating through a queue. The use of queues removes the requirement that both the receiving and sending applications execute concurrently. Some of the more mature MQ products are IBM WEBSPHERE MQ and so on.
Exchange: A switch that determines the message routing rules;
Queue: Message Queuing;
Channel: Access to read and write messages;
Bind: Binds queue and exchange, which is the message queue that conforms to what routing rules it will be placed in;
One disk node: 192.168.177.145
One memory node: 192.168.177.135
One memory node: 192.168.177.132
Disk node
# vim /etc/hostname mq01.localadmin# vim /etc/hosts 192.168.177.145 mq01 192.168.177.135 mq02 192.168.177.132 mq03# init 6
Memory nodes
# vim /etc/hostname mq02.localadmin# vim /etc/hosts 192.168.177.145 mq01 192.168.177.135 mq02 192.168.177.132 mq03# init 6
Memory nodes
# vim /etc/hostname mq03.localadmin# vim /etc/hosts 192.168.177.145 mq01 192.168.177.135 mq02 192.168.177.132 mq03# init 6
Disk node
# systemctl stop firewalld.service# setenforce 0# ln -s /usr/lib/rabbitmq/bin/* /usr/bin/ //识别命令# rabbitmq-plugins enable rabbitmq_management //提供web端# systemctl start rabbitmq-server.service //开启服务# rabbitmqctl cluster_status //查看状态
Memory nodes (two units)
# systemctl stop firewalld.service# setenforce 0# ln -s /usr/lib/rabbitmq/bin/* /usr/bin/ //识别命令# rabbitmq-plugins enable rabbitmq_management //提供web端# systemctl start rabbitmq-server.service //开启服务# rabbitmqctl cluster_status //查看状态
Disk node
# systemctl stop rabbitmq-server.service# cd /var/lib/rabbitmq/# cat .erlang.cookie JZVFRKVBEINPGMWDOFOR//查看序列号,进行复制# systemctl start rabbitmq-server.service
Memory nodes (two units)
# systemctl stop rabbitmq-server.service# cd /var/lib/rabbitmq/# vim .erlang.cookie JZVFRKVBEINPGMWDOFOR //换成这个# systemctl start rabbitmq-server.service# rabbitmqctl stop_app //停掉rabbitmq应用# rabbitmqctl join_cluster --ram [email protected] //调用cluster命令,将mq02连接到mq01# rabbitmqctl start_app //启用rabbitmq应用# rabbitmqctl cluster_status //查看状态
Disk node
# rabbitmqctl cluster_status //查看状态
Large Web site architecture of tens of millions of PV RABBITMQ