port 5672. Two. translation of the English version2.1 IntroductionRABBITMQ equivalent to a message agent, he finished receiving and forwarding the message function, you can think of it as a post office, play a role in the relay. RABBITMQ will use a number of technical terms, as follows:>producer: The program used to send messages is called a Producer, and we use ' P ' to denote:>queue:
1: Environment SelectionThe system for Ubuntu 15.04, I installed in the virtual machine inside the2:rabbitmqTABBITMQ 3.5.4 Download url:http://www.rabbitmq.com/3: InstallationIn the Ubuntu environment, it is recommended that you download the Deb installer directly, install it directly in Ubuntu package management, and install other dependent packages4: StartIf the Deb package is installed directly, it is started directly by default, or it can be started by sudo
Because want to use Python to implement a set of distributed system, to manage and monitor CDN content and running state, stumbled to know RABBITMQ, recommended many people, such as Yu Feng "Why should I choose RABBITMQ" and so on.
I spent hours reading about MQ, the message queue, when I was greeted by the word MQ. As the name implies, a message
message.QueueMessage Queuing, which provides a FIFO processing mechanism with the ability to cache messages. RABBITMQ, queue messages can be set to persist, temporarily, or automatically deleted.Set to persistent queues, messages in the queue are stored on the server's local hard drive to prevent system crash and data lossSet as temporary
-consumer.xml");} }of course, Direct is similar to the above, except that this is based on routing matching, first send the data to the switch, then bind the route and queue, through the switch ID and route to find the queue, the following are some of the main configurationexchange: defines the Exchange Mode as direct, which means that the message is not forwarded until it exactly matches a specific rout
indicates Producer:
A Queue is similar to a mailbox. Depends on the inside of RabbitMQ. Although messages are transmitted in your application through RabbitMQ, they can only be stored in queue. The queue is unrestricted and can store any number of messages-essentially an u
port 5672. Two. translation of the English version2.1 IntroductionRABBITMQ equivalent to a message agent, he finished receiving and forwarding the message function, you can think of it as a post office, play a role in the relay. RABBITMQ will use a number of technical terms, as follows:>producer: The program used to send messages is called a Producer, and we use ' P ' to denote:>queue:
, Handling accepted messagesPrint bodyChannel.basic_consume (callback, queue = ' Hello ', no_ack = True) #告诉rabbitmq使用callback接收消息, no_ack=true indicates that the message is not active after consumption is finished Notify RABBITMQ of the completion status.Channel.start_consuming () #开始接收信息, into the blocking state, there is information in the
RABBITMQ Installation:
1. RABBITMQ is based on Erlang, so you must first configure the Erlang environment. Install Erlang
Go to Erlang's website: http://www.erlang.org for downloadThere are two ways of installing:
1.1. Source Installation Method:
mkdir Erlang
cd Erlang
wget wget http://www.erlang.org/download/otp_src_18.0.tar.gz
tar-xzvf otp_src_ 18.0.tar.gz
cd otp_src_18.0.tar.gz
./configure--prefix=${e
is a listening program, method is the way to execute, queues is the queue we listen to, multiple queues can be separated by commas (because we are using distribution, so three queues get the same message, here for the sake of simplicity I put in a listener, In fact, we can write three consumers, each listening to a queue of consumersNow you just need to start the program to runpublic class Consumermain {pu
1. HistoryRABBITMQ is an open source implementation of the AMQP (Advanced Message Queue) developed by Erlang. The emergence of AMQP in fact is also the needs of the masses of people, although in the world of synchronous messaging communication there are many public standards (such as Cobar IIOP, or SOAP, etc.), but in the asynchronous message processing is not so, only large enterprises have some business implementation (such as Microsoft's MSMQ, IBM'
RABBITMQ, as a mature enterprise message middleware, realizes the decoupling of interface calls between applications and improves the throughput of the system.1.RABBITMQ Composition
is an open source implementation of Advanced Message Queuing Protocol (AMQP) provided by LShift, written in Erlang, known for its high performance, robustness, and scalability, and therefore inherited these benefits.
. You do not need to queue the message to wait for the consumer.$ Channel-> basic_publish ($ msg, 'amq. Direct', 'bbb ');
4. Receive
// No-ack is used for confirmation. That is to say, after each Consumer receives the data, the RabbitMQ Server immediately marks the Message as complete and then deletes it from the Queue.$ Channel-> basic_consume ('hello', '', fals
messages according to your specified rules.
Some common terms of rabbitmq:Producing means sending. A message sending program is a producer ). Generally, it indicates producer:
A queue is similar to a mailbox. Depends on the inside of rabbitmq. Although messages are transmitted in your application through rabbitmq, they can only be stored in
administrator,monitoring,policymaker,management or other custom nameYou can set up multiple roles for the same user, such as:Rabbitmqctl set_user_tags TESTMQ Monitoring policymaker AdministratorReference:Http://www.rabbitmq.com/management.html6. User RightsRefers to the user's operation rights to Exchange,queue, including configuration permissions, read and Write permissions.Configuring permissions affects the Declaration and deletion of Exchange,que
Janet previous chapter "Looking at the Big Data era of IT Architecture" (2) Message Queuing rabbitmq-Basic concept detailed introduction, roughly speaking, the current message queue of several common products of the pros and cons of the comparison, the next few chapters will be elaborated in detail, this chapter introduces RABBITMQ, okay, nonsense less say, Offic
RabbitMQ original translated 05 -- routing, rabbitmq translated 05 -- Routing
In the previous article, we built a simple log system that can broadcast messages to multiple recipients.
In this article, I will add some functions to make it possible to accept some messages. For example, we only record error messages on disk, at the same time, all messages can be printed to the screen.Bind
In the previous case,
Tutorial on the official website of RabbitMQ --- route, official website of rabbitmq --- route
(Use python client pika 0.9.8)
In the previous tutorial, we built a simple log system. We can broadcast log messages to many recipients.
In this tutorial, we will add a feature to it-we will subscribe to only one message subset as possible. For example, we can direct only error messages to log files (saved to dis
Learn to use. Looking for a half-day node. JS under the RABBITMQ Library, looks not to take the hand, until finally found the AMQP library, it looks good, according to the example, wrote the first RABBITMQ client.First, install the NODE-AMQP library using NPM install AMQP--save, although he recommends using a global installation, but don't do it!The following is the client code:[JavaScript]View Plaincopypri
Set up a RabbitMq cluster and a rabbitmq Cluster
Lab environment:
The operating system is Centos 7.2.
IP hostName
192.168.190.132 node132
192.168.190.139 node139
192.168.190.140 node140
RabbitMQ Port
4369 (epmd)
5672,567 1 (AMQP 0-9-1 and 1.0 without and with TLS)
25672. this port used by Erlang distribution for inter-node and CLI tools communication and i
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.