The opening
When it comes to message queuing , I believe you are not new . In fact, everyone has used it in their daily work . It is believed that most of the R & D is just staying in the process of using message queues , The knowledge points inside are not very systematic , Some powerful functions may not be accessible due to the business form or business level of the company . That's what old cats do at work , What is used MQ All are encapsulated by architects , Simply call . In order to better understand why , So the old cat took the time to sort it out MQ A series of knowledge points , It is said that “ Bad writing is better than good memory ”, So the old cat recorded it in the process of learning . Share it with friends in need , Of course, it is also convenient for you to consult later , So there is this series of articles .
AMQP Protocol Brief
Many of you have come into contact with RabbitMq, Actually RabbitMq Namely AMQP An implementation of the protocol .
Rather than AMQP It's a protocol , In fact, it is a standard . Is an open standard for application layer protocols , Designed for message-oriented middleware .AMQP It's a network protocol that delivers asynchronous messages between processes . Its full name is AMQP(Advanced Message Queuing Protocol). The client and message middleware based on this protocol can deliver messages , Not by the client / Different middleware products , Restrictions on different development languages and other conditions .AMQP The main feature is message oriented 、 queue 、 route ( Including point-to-point and release / subscribe )、 reliability 、 Security .AMQP The behavior of the message provider and the client is mandatory , This enables different vendors to truly realize interoperability .
About Kafka and AMQP Add a separate point
I believe that in our daily work, in addition to RabbitMQ Besides, many friends have used it kafka Well , that kafka and AMQP What does it matter ?
The answer is : No problem .
Kafka Not a message queue at all . Officially ,Kafka It's a streaming platform (stream processing platform).Kafka It was designed to support high throughput log processing , It just happens to be able to implement most of the functions of message queuing .Kafka Used “ Black science and technology ”( For example, zero copy / Memory mapping , And right page cache The use of , Of course, these follow-up sharing kafka And then synchronize with the little buddy when you get there ) They are out of the scope of the standard message queue design , So we can't simply think of Kafka Than RabbitMQ Etc AMQP Better message queuing for . for example ,RabbitMQ Support dead letter queue 、 Delay queue 、 Priority queue 、 multi-tenancy 、 Push mode consumption, etc ,Kafka They don't support .
AMQP and JMS The difference between
Speaking of AMQP agreement , You have to talk JMS. JMS It is an attempt to standardize the early message oriented middleware , It's just API Level has been standardized . Only applicable to Java The message oriented middleware specification of the platform , Support Java Message exchange between applications . And by providing standard production 、 send out 、 The interface to receive messages simplifies the development of enterprise applications . If you want to know more about JMS In fact, Baidu Encyclopedia has a very detailed explanation . The specific links :https://baike.baidu.com/item/JMS/2836691?fr=aladdin,
In addition, if a small partner wants its specific interface document , You can download here :https://download.oracle.com/otndocs/jcp/7195-jms-1.1-fr-spec-oth-JSpec/
JMS A brief summary
JMS It mainly includes two models ,(1) Point to point model (2) Publish and subscribe model

Point to point : The producer sends a message to the queue. Only one listener can get the message .
Publish subscribe : The producer delivers a message to the queue , All subscribers listening to the queue can get the message .
JMS Five different message body formats
JMS Five different message body formats are defined , And the type of message called , Allows you to send and receive data in different forms , Provides some level of compatibility with existing message formats .
- StreamMessage – Java Data flow of original value
- MapMessage– A set of names - It's worth it
- TextMessage– A string object
- ObjectMessage– A serialized Java object
- BytesMessage– One byte data flow
AMQP Model generalization
AMQP Model as follows 
- Server: also called Broker, Accept client connections , Realization AMQP Physical services .
- Connection: Connect , Application and Broker The Internet connection .
- Channel: Network channel . Almost all operations are in Channel In the middle of ,Channel It's a channel for reading and writing messages . The client can create multiple Channel, Every Channel Represents a conversational task .
- Message: news , Data transferred between the server and the application , from Properties and body form ,Properties You can decorate the message , For example, the priority of a message 、 Advanced features like delay ;Body Is the message body .
- Virtual host: Virtual address , Due to logical isolation , Top level message routing . One Virtual Host There can be several Exchange and Queue, The same Virtual Host It can't have the same name Exchange or Queue.
- Exchange: Switch , receive messages , Forward the message to the bound queue according to the routing key .
- Binding:Exchange and Queue Virtual connection between ,binding Can contain routing Key.
- Routing Key: A routing rule , Virtual machines can use it to determine how to route a particular message .
- Queue: Also known as Message Queue, Message queue , Save messages and forward them to consumers .
AMQP and JMS contrast
The above has made some simple generalizations , If you feel that you are lacking , Not too complete , Then you can consult relevant information by yourself .
| Contrast direction | JMS | AMQP |
|---|---|---|
| Definition | Java API | agreement |
| Cross language | no | yes |
| Cross platform | no | yes |
| Contrast the model | ①Peer-2-Peer( Point to point ); ②Pub/sub( Publish subscribe ) | ①direct exchange; ②fanout exchange; ③topic change; ④headers exchange; ⑤system exchange. In essence , The last four and JMS Of pub/sub The model doesn't make much difference , Only in the routing mechanism to do a more detailed division ; ( This follow-up old cat will share with you rabbitMq I'll talk about it in detail ) |
| Message type | Support multiple message types , We mentioned above | byte[]( Binary system ) |
At the end
About AMQP This is the brief introduction of the agreement . If you feel that there is not enough detail, of course, you can spontaneously look for more information . The old cat in the back will focus on sorting RabbitMq as well as Kafka And share with you . Looking forward to your continued attention .
Talk about message oriented middleware (1),AMQP More about those things
- 【 Pandora's box get√】 Replace space with time , Talk about sparse arrays
background A data structure is a collection of data elements with structural characteristics . In data structure , Data are associated with each other through a certain organizational structure , Convenient for computer storage and use . Classification from major categories , Data structure can be divided into linear structure and nonlinear structure , It is suitable for different application scenarios . linear ...
- About display The things about !
About display The things about ! display,display,display! Hey, hey, hey !display this CSS attribute , It's quite amazing ! Set it to a different value , The modified tag changes its properties accordingly , ...
- ActiveMQ- Why message middleware is needed ?
Advantages of message middleware UNIX The message queue technology has been used in the communication between processes , A process writes data to a specific queue , Other processes can read the data in the queue , So as to realize asynchronous communication . For today's distributed systems , Message queues have evolved into independent message centers ...
- RabbitMQ From concept to use 、 from Docker The installation to RabbitMQ Integrate Springboot【1.5w Word nanny teaching 】
@ Catalog One . Preface Two .RabbitMQ effect 1. Asynchronous processing 2. The application of decoupling 3. flow control 3、 ... and .RabbitMQ Concept 1. RabbitMQ brief introduction 2. The core concept Four .JMS And AMQP Compare 5、 ... and .Rab ...
- [No0000193]Chrome Browser console (console) Fancy debugging
For front-end developers ,Chrome Dev Tools( Developer tools , hereinafter referred to as CDT) Is an indispensable development and debugging tool , But you may have only used console.log(), But I don't know console There are also many powerful debuggers ...
- RabbitMQ The production consumer mode and subscription publishing mode under
So called mode , It's in a certain situation , A summary of a class of problems and their solutions . Production consumer mode and subscription publishing mode are two common modes when using message middleware , For function decoupling and message communication between distributed systems , Take the following two scenarios as examples : Data access hypothesis ...
- well-known APP( Alipay 、 WeChat 、 Petals, etc ) Home page design skills and prototype examples
APP Home page design right APP In itself is crucial , An excellent APP product , Its home page design not only needs to clearly show the core functions of the product , Create a good user experience for users , But also need to show the company's brand image , Enhance brand awareness in the hearts of users . today , Just ...
- 《Excel Efficiency manual : Finish early , Do not work overtime 》
<Excel Efficiency manual : Finish early , Do not work overtime > essential information author : Chen Xilu Yang Minghui Press. : tsinghua university press ISBN:9787302350743 Shelf time :2014-5-8 Publication date :2014 ...
- openstack rpc Mechanism
One . summary : stay openstack In the project ,api Call rules for : Cross project : Such as nova call keystone, glance,cinder etc. , Use rest api( Through the corresponding python-XXXclient library ...
- JVM Escape analysis of
We all know Java Objects in are assigned to the heap by default , In the call stack , Only the pointer of the object is saved . When the object is no longer in use , Need to rely on GC To traverse the reference tree and reclaim memory . If there are too many objects in the heap , Recycle objects and organize memory , Will bring time consumption , ...
Random recommendation
- Download the pictures to the server according to the website C# Code
Download the pictures to the server according to the website C# Code ASPX Page code : <%@ Page Language="C#" AutoEventWireup="true" Cod ...
- iOS-NSURLCache Memory cache
stay IOS Application development , To reduce the number of interactions with the server , Speed up user response , Usually in IOS Add a caching mechanism to the device . The purpose of using cache is that the application can respond to user input more quickly , Is the efficient operation of the program . Sometimes we need to ...
- oracle Variable assignment
stay oracle Use in select Field into Variable from surface where Conditions When this method assigns a value to a variable, it is the same as MSSQL There is a big difference in your behavior . stay MSSQL If no rows are retrieved in the table , Then the value of the variable is preserved ...
- [Microsoft][ODBC Microsoft Access Driver] INSERT INTO Sentence syntax error .
The situation I met : sta.executeUpdate("insert into surface 1(longitude,latitude,time) values("+a[0]+",&qu ...
- main The correct format of the function
main The function is called the master function , One C The program always starts from main() Function started . In relation to C Language in Web posts and books , You can see main Multiple formats of functions , These formats , Some are right , Some are incorrect , To avoid mistakes , It is summarized as follows . ...
- jQuery Source code analysis and use experience - order
as everyone knows , jQuery ( Personal abbreviation is jq) It plays a very important role in front-end development , so to speak jQuery The existence of web design greatly reduces the threshold of learning web design and interaction , His simple grammar and smooth use of logic stimulate people's strong interest in learning , ...
- Java course - Beginners Day08 Array
One , What is an array So called array , Is a collection of elements of the same data type arranged in a certain order . If you name a limited set of variables of the same type , So the name is array name . The variables that make up an array are called the components of the array , Also known as an array of elements , Sometimes called subscript variable . use ...
- Silverlight The understanding of
Microsoft Silverlight It's a cross browser . Cross platform plug-ins .Silverlight Provide a flexible programming model , And can be easily integrated into existing network applications .Silverlight Can run on Mac or ...
- Python And R The difference and connection
from :http://bbs.pinggu.org/thread-3078817-1-1.html Some people say Python and R The difference is obvious , because R It's for statistics ,python It's designed for programmers , Actually, that's right ...
- Use idea stay springboot Add local jar The method of the package runs effectively locally , Once you need to call jar You're going to report a mistake , This needs to be done in
https://blog.csdn.net/huxiaodong1994/article/details/80702278 1. First of all, with src Create a new one under the directory of the same level lib Catalog , And then local jar bag li ...





![buuctf [PHP]CVE-2019-11043](/img/ba/d97fe48acfd20daa66d47f34d99cf1.png)



