Python development [Article 10]: RabbitMQ queue, pythonrabbitmqIntroduction
RabbitMQ is a popular open-source message queue system developed in erlang. RabbitMQ is the standard implementation of AMQP (Advanced Message Queue Protocol.Install
First install the erlang environment.
Official Website: http://www.erlang.org/
1. Service for ManagementErlang is born to communicate with the application without needing to know if the other person exists on the same machine.Erlang node: each instance of an Erlang virtual machine. Multiple Erlang applications can run on top of the same node. Local communication can be made between nodes (regardless of whether they are running on the same server). An example of this is that an application running on Node A can invoke the application's method on Node B, just as if it were c
[RabbitMQ] 2. Experience summary, Data Summary, and rabbitmq Data SummarySpring AMQP Chinese Document
Http://ju.outofmemory.cn/entry/320538Yunqi community https://yq.aliyun.com/search? Q = rabbitmq type = ARTICLE
RabbitMQ-JAVA common errors, https://yq.aliyun.com/articles/175024Install
RABBITMQ is based on Erlang, so you must first configure the Erlang environment.
Download the latest Erlang installation package from Erlang's official website http://www.erlang.org/download.html, the version of Linux and MacOSX download is r15b01 Source File (72.0 MB)
My is Mac OSX system so i downloaded the corresponding version of the installation package directly in HTTP://WWW.ERLANG-SOLUTIONS.COM/SECTION/132/DOWNLOAD-ERLANG-OTP, the provi
cluster nodes include memory nodes, disk nodes, and support message persistence, that is, data written on disk.
Rabbit Working process
(1) The client connects to the Message Queuing server and opens a channel.(2) The client declares an exchange and sets the related properties.(3) The client declares a queue and sets the related properties.(4) The client uses routing key to establish a good binding relationship between Exchange and queue.(5) Clients post messages to exchange.(6)
One: Installation of RABBITMQ:Reference: http://www.blogjava.net/hellxoul/archive/2014/06/25/415135.htmlhttp://blog.haohtml.com/archives/15249Description: Modify the machine name before installing (prepare for the cluster behind)Vi/etc/sysconfig/network Modify NameVi/etc/hosts Modify the address mapping table, such as 192.168.1.112 rabbitmq-node1.com rabbitmq-node1 #做集群时设置Restart1.
RabbitMQ Windows installation and configuration
Official website windows:
Http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.10/rabbitmq-server-3.6.10.exe
GitHub Windows Edition:
HTTPS://GITHUB.COM/RABBITMQ/RABBITMQ-SERVER/RELEASES/DOWNLOAD/RABBITMQv3
amqp protocol. When using rabbit, you need to import some libraries, which also follow the amqp protocol like rabbit. Multiple libraries are available for each language. Python implementation libraries include:
-> Py-amqplib
-> Txamqp
-> Pika
This document mainly uses the pika library. Install the pythonpika package: $ sudo Pip install pika = 0.9.8
Install
modules function exactly the same, but do not affect each other; when one of the RABBITMQ goes down, the corresponding task processing process stops. Does not affect the other node to work properly.This example environment:rabbitmq1:192.168.1.121 Hostname:initiatorrabbitmq2:192.168.1.114 Hostname:mygatewayKeepalived (Master) +lvs:192.168.1.121Keepalived (Backup) +lvs:192.168.1.114vip:192.168.1.120To configure the
routing policiesDistributed: Cluster support, including local and remote networksHigh availability: Support for master-slave backup and mirror queueMulti-lingual Support: Multi-lingual Client SupportWeb interface Management: Can manage user rights, exhange,queue,binding, and real-time monitoringAccess control: Implementation of access control based on vhostsDebug tracking: Support tracing, easy to debug1.4) RABBITMQ Usage scenarios:single send single
Tags: technical cal file Erlang Linux run open gcc userOne: System PreparationHere I was on the Vmare installed 3 CenOS7 64-bit system, ready for the post-distribution of distributed Message Queuing.Two: Installation steps:1. The prerequisite software is undoubtedly elang and rabbitmqserver, download two Linux versionsErlang RabbitMQ ServerExtract to file directory, rename Elang and RABBITMQ2. Unlike Windows, Linux must
declares an exchange and sets the related properties.(3) The client declares a queue and sets the related properties.(4) The client uses routing key to establish a good binding relationship between Exchange and queue.(5) Clients post messages to exchange.
Having understood RABBITMQ's approximate process and advantages, I started experimenting with rabbitmq on my fedora.
According to RABBITMQ website, insta
What is RABBITMQ? MQ (Message queue) message middleware, which is generally deployed in cluster mode, mainly provides the receiving and sending of messages, and realizes the synchronization of messages between each micro-service. Principle Introduction RABBITMQ is based on the distributed nature of Erlang (RABBITMQ is implemented by the Erlang architecture, so ra
//The other two units are mq02,mq03
Restart the host for the host name to take effect
Init 6
Shut down the experimental host's firewall and SELinux function (otherwise it will affect the experimental effect) after rebooting
Service Firewalld StopSetenforce 0
Three nodes install RABBITMQ software with Yum
Yum install-y epe
CentOS Installation RABBITMQ1, RABBITMQ is the Erlang language development, before installing the first need to install Erlang# yum Install erlang-y//Direct installation may be an error,# yum Install Ncurses-devel//installation dependentOfficial Download Erlang Package# wget http://erlang.org/download/otp_src_19.0.tar.
: This article mainly introduces the principles and Operation examples of RabbitMQ and PHP (1) -- RabbitMQ. if you are interested in PHP tutorials, refer to it. RabbitMQ is a popular open-source message queue system developed in erlang language. it fully implements AMQP (Advanced Message queue protocol ). The website is on: http://www.rabbitmq.com/with tutorials
1. What is RABBITMQMQ (Message queue): A queue of messages that is designed by the server to store a large number of messages and provides a way for the client to operate the queue: the production queue (adding data to the queue), the consumption queue (fetching data from the queue). RABBITMQ is a typical application based on Message Queuing. RABBITMQ In addition to the normal production and consumption
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.