{{ variable.name }}
Introduction: Message queue is a high-end term. Essentially, it refers to how business is queued for processing. The most common usage scenario is when sending text messages using a text message queue. However, message queues can do more than just this type of scenario. They have a wide range of applications in decoupling, peak shaving, asynchronous operation, consistency, and other aspects. Therefore, how to use message queues reasonably to handle some special business requirements is the content we will solve in this class.
Courses required library file: http://pan.baidu.com/s/1bQg038
Chapter 1: The Concept, Principle and Scenarios of Message Queues
This paper provides a detailed introduction to the concept of message queues and some scenarios where they are applicable, and summarizes the advantages and disadvantages of the technical points used in them.
1-1 Message Queue
Chapter 2 Decoupling Case: Queue Processing Order System and Delivery System
This paper explains the case of using message queues for decoupling. A table in mysql is used as the queue storage to implement middleware for decoupling the order system and the delivery system. The order system is used for real-time writing, and the processing program of the distribution system is started with scheduled tasks to process the queue and mark the results, making the two business systems independent of each other for separate deployment and preventing chain failures caused by the failure of one system.
2-1 Message Queue configuration and preparation Work
2-2.Mysql Order Queue
Chapter 3 Traffic Peak Shaving Case: Redis' List Type Achieves Flash Sale
Here is a case of peak shaving with high traffic at a flash sale time point. The List type of Redis is used for queue storage, and the high speed of Redis is utilized to process the large amount of traffic during the flash sale. Then, a processing program is used to place the cached results in the database. By using the in-memory database caching mechanism, the huge traffic is blocked in front of the database, effectively reducing the load on the server I/O.
3-1 Redis
3-2 Redis queue flash sale achieved
Chapter 4 RabbitMQ: A More Professional Implementation Solution for Messaging Systems
Taking RabbitMQ as an example, this paper explains the principles of some professional messaging systems and uses the official DEMO to demonstrate the usage method of one of the modules. Understand the steps and application scenarios of using this type of messaging system.
4-1 RabbitMQ
Chapter 5 Summary
Summarize the methods and precautions for using message queues in various scenarios.
5-1 Summary