1. History of Message Queuing
Knowing the ins and outs of one thing will not be mysterious to it. Let's take a look at the development history of the message queue, the technology.
The message queue has a long history of the 80 's, the first in financial transactions, Goldman Sachs and other companies to adopt Teknekron Company's products, then the Message Queuing software is called: The Information Bus (TIB). TIB was adopted by telecoms and communications companies, and Reuters acquired Teknekron Corp. IBM developed the MQSeries, and Microsoft developed the Microsoft Message Queue (MSMQ). The problem with these commercial MQ vendors is that they are vendor-locked and expensive. In 2001, Java Message queuing tried to solve the problem of locking and interactivity, but it was even more troublesome for the application.
So in 2004, JPMorgan Chase and Imatrix began the development of the Advanced Message Queuing Protocol (AMQP) open standards. 2006, the AMQP specification was released. In 2007, Rabbit Technology Inc. RABBITMQ 1.0, developed based on the AMQP Standard, was released.
Currently, the latest version of RABBITMQ is 3.5.7, based on AMQP 0-9-1.
RABBITMQ is developed using Erlang language. The Erlang language is designed by Ericson and is used extensively in the telecommunications field for the development of a language for concurrent and distribution systems. OTP (Open Telecom Platform), as part of the Erlang language, contains a number of Erlang-based middleware/libraries/tools such as MNESIA/SASL, which greatly facilitates the development of Erlang applications. The OTP is similar to the many module in the Python language, which enables users to develop applications conveniently.
2. Basic concepts in AMQP messaging
3. Typical "Production/consumption" message model
The producer sends a message to broker Server (RabbitMQ). Inside the broker, the user creates the Exchange/queue and ties the two together through the binding rules. Exchange distributes messages, which differ according to the different distribution policies of type/binding. The message finally comes to the queue, waiting for the consumer to take it.
4. Exchange Type
There are several types of exchange, the most common being direct/fanout/topic three types.
If the "Routing key" in the message is consistent with the "binding key" in the binding, Direct Exchange sends the message to the corresponding queue.
Each message sent to Fanout type Exchange is divided into all bound queue.
Depending on the routing key, and the wildcard rules, Topic Exchange is distributed to the target queue.
Routing key can contain two wildcard characters, similar to regular expressions:
It is also recommended for students who want to learn about RABBITMQ a website, http://tryrabbitmq.com, which offers an online RABBITMQ simulator that can help understand exchange/queue/binding concepts.
At this point, we have made a complete introduction to the development of Message Queuing, the generation of RABBITMQ, and the important concepts in the AMQP protocol.
RABBITMQ and AMQP Protocol detailed