[RabbitMQ]Basic related concepts and installation

Reference: "RabbitMQ Practical Guide"


1.What is message middleware?

  • Message Queue Middleware Message Queue Middleware
    refers to the use of efficient and reliable messaging mechanisms for platform-independent data exchange, and the integration of distributed systems based on data communication.
    By providing a message passing and message queuing model, it can extend inter-process communication in a distributed environment.
    Also because it is mostly integrated for data communication between distributed systems, it is also called distributed message middleware.
    Insert image description here

2.The role of MQ (message queue)

The full name of MQ is Message Queue (Message Queue), which refers to the container used to save messages during the transmission process of messages. Mostly used for communication between distributed systems.
There are many functions and advantages of message queues. Here we briefly list two or three:

  • Message storage (persistence)
    In the communication between distributed systems, there will be situations where data processing fails or is lost. When the message queue is used, it can persist the message for us, and can provide some confirmation and Mechanisms such as resending ensure the reliability of messages.

  • Asynchronous extraction of messages.
    With this message queue, the sending and receiving time points of the sender and the receiver have become relatively free. The original words in the book are: In many cases, the application does not want or need to process the message immediately . In this case Message middleware provides an asynchronous processing mechanism, allowing applications to put these messages into the message middleware, but not process it immediately, and process it slowly when needed later. This effect cannot be achieved without middleware.

  • Peak shaving and valley filling
    mainly use the buffering function of the message queue. Suppose that a certain system can only process 100 request messages per second. Suddenly, the number of accessed messages increases to 500. At this time, the system may not be able to withstand the pressure. Downtime, after using the message queue, the accessed information will not be directly hit to the processing system, but will be stored in the message queue. The system can set the number of requests processed per second, that is, pulled from the queue per second. How many requests are processed can prevent the system from being overwhelmed by a sudden increase in access. This is Xiao (cut) peak. It takes 500 requests in one second to process 100 requests in five seconds. This is filling the gap, and the two are inseparable. This is to ensure system stability.
    Insert image description here

3. Related message queue products

Four representative types of message middleware:
Insert image description here

4.RabbitMQ Overview

RabbitMQ is a message middleware product based on the AMQP standard developed in the Erlang language . It originally originated from the financial system and is used to store and forward messages in distributed systems.
Insert image description here

Official website: RabbitMQ
Among them, the Erlang language was designed by Ericson. It is a language specifically designed for developing high concurrency and distributed systems . Because of the language, it has strong concurrency capabilities, strong real-time communication capabilities, and the lowest message delay. , this is also the advantage of Erlang language.
As for AMQP, we will explain it in detail in the next section.
And why is it called RabbitMQ?
This is what the book says:
Insert image description here
The "by Pivotal" official website logo seems to be no longer visible. . .

5.JMS and AMQP

Starting with the development of MQ:
Before the proliferation of message middleware, there were some commercial implementations of message middleware, such as Microsoft's MSMQ (MicroSoft Message Queue), IBM's WebSphere, etc., but they all have the same advantages, that is, they are expensive and Due to commercial barriers, commercial MQ vendors want to solve the problem of application interoperability, rather than creating standards to achieve interoperability between different MQ products, or allowing applications to change the MQ platform.
Insert image description here
In the future, we will use the jar package that encapsulates the AMQP protocol API in our development and exercises.

6.RabbitMQ installation

If you are just learning to use it, it may be more convenient to install it on a Windows system, and you don’t need to open a virtual machine. However, the final use will definitely not be installed and deployed on Windows, so here we provide a variety of installation methods. Because it is relatively independent, I will open a separate blog here to explain it separately:

Guess you like

Origin blog.csdn.net/cjl836735455/article/details/109498246