Joke Collection Website - Public benefit messages - Please explain the use of ActiveMQ in vernacular

Please explain the use of ActiveMQ in vernacular

The purpose is to process messages, that is, to process JMS. Message queues are widely used in large e-commerce websites, such as JD.com, Taobao, Qunar and other websites. The main function of the queue is to eliminate high concurrent access peaks and speed up the response speed of the website.

Without using the message queue, the user's request data is written directly to the database. In the case of high incidence, it will cause huge pressure on the database and also increase the system response delay. However, after using the queue, , the user's request is returned immediately after being sent to the queue.

For example: You cannot directly prompt the user that the order has been submitted successfully. JD.com prompts: "You have submitted the order, please wait for system confirmation." Then the consumer process of the message queue obtains the data from the message queue and writes it asynchronously. into the database.

Since the service processing speed of the message queue is much faster than that of the database, the user's response delay can be effectively improved.

Extended information:

ActiveMQ mainly has the following usage scenarios

1. Asynchronous call.

2. One-to-many communication.

3. Do integration, isomorphism and heterogeneity of multiple systems.

4. As a replacement for RPC.

5. Multiple applications are decoupled from each other.

6. As the behind-the-scenes support of event-driven architecture.

7. In order to improve the scalability of the system.