Message Queue (MQ) can be applied to the following scenarios:
In traditional transaction processing, interaction between multiple systems is coupled to one transaction, resulting in long response time and affecting system availability. Distributed transactional messages can be introduced between a transaction system and MQ to implement transaction processing, which ensures ultimate data consistency between the distributed systems. Downstream service systems (shopping cart, points, etc.) are isolated and supports parallel processing.
Through MQ, the data generated by the source continuously flows into the computing engine in real time for real-time computing. The following computing engines can be used: Spark/Storm/EMR/ARMS/BeamRunner.
In major commercial promotional events such as the Double 11 Shopping Carnival, a wide variety of products will be presented in different website sub-venues, and the price of each product may change in real time. Meanwhile, there will be a large amount of concurrent accesses to the product database, causing a long response time on the venue page. Caches are stored in a centralized fashion and the bandwidth becomes the bottleneck, so the access requirements on product prices cannot be satisfied.
The MQ can reduce the page response time by means of large-scale cache synchronization, satisfying the customers’ access requirements on product prices.
In Alibaba, both TradeManager (an app for instant trade communication) and DingTalk (an app for office communication) use MQ for their messaging services. A large number of messages are generated during each interaction occurred in 1-on-1 chats, group chats, DingTalk notifications, and “Grabbing Red Packets” activities.