tencent cloud

Scenarios
Last updated:2026-01-23 17:09:48
Scenarios
Last updated: 2026-01-23 17:09:48
As a distributed message middleware built based on Apache RocketMQ, TDMQ for RocketMQ is used for message communication between distributed systems or components. It has features such as massive message backlogs, low latency, high throughput, high reliability, and strong transaction consistency. It is suitable for scenarios such as asynchronous decoupling, peak shifting, sequential message sending and receiving, distributed transaction consistency, and log synchronization.

Asynchronous Decoupling

The transaction engine is the core system of Tencent billing. The data of each transaction order needs to be monitored by dozens of downstream business systems, including inventory system, warehousing system, promotion system, and points system. Such systems use different message processing logic, making it impossible for a single system to adapt to every associated business. In this case, TDMQ for RocketMQ can decouple multiple business systems to reduce the impact between systems and improve the response speed and robustness of core business.




Peak Shifting

Companies hold marketing campaigns such as new product launch and festival red packet grabbing from time to time, which often cause temporary traffic spikes and pose huge challenges to each backend application system. A simple response by scale-out can lead to a waste of resources. In this case, TDMQ for RocketMQ can withstand spikes in traffic. It backlogs messages during peak periods and consumes them in the downstream during off-peak periods. This balances the processing capacities of upstream and downstream systems and improves system availability.




Subscription Notifications

TDMQ for RocketMQ provides scheduled and delayed messages for e-commerce scenarios that require subscription notifications.
Scheduled messages: After a message is sent to the server, the business may want the consumer to receive it at a later time point rather than immediately. Messages of this type are called scheduled messages.
Delayed messages: After a message is sent to the server, the business may want the consumer to receive it after a period of time rather than immediately. Messages of this type are called delayed messages.
For details about scheduled and delayed messages, see Scheduled and Delayed Messages.




Consistency of Distributed Transactions

TDMQ for RocketMQ provides distributed transactional messages to loosely couple applications. Reliable transmission and multi-replica technology can ensure that messages are not lost, and the At-Least-Once feature ensures eventual data consistency.
The payment system, as a producer, forms a transaction with TDMQ for RocketMQ to ensure consistency in local transactions and message sending.
Downstream business systems (such as billing and notifications), as consumers, process messages in parallel.
Reliable retries of messages are supported to ensure eventual data consistency.
The transactional messages of TDMQ for RocketMQ are used to process transactions, which can greatly improve processing efficiency and performance. A billing system often has a long transaction linkage with a significant chance of error or timeout. The automated repush and massive message backlog features can be used to provide transaction compensation, and the eventual consistency of payment tips notifications and transaction pushes can also be achieved through TDMQ for RocketMQ.
For detailed information about transactional messages, see Transactional Messages.




Sequential Message Sending and Receiving

Ordered messages are advanced messages provided by TDMQ for RocketMQ. For a specified topic, messages are published and consumed in strict accordance with the First In First Out (FIFO) principle, which means that the messages sent first are consumed first, and the messages sent later are consumed later. Ordered messages are often used in the following business scenarios:
Order creation: In certain e-commerce systems, the creation, payment, refund, and logistics messages related to the same order must be produced or consumed in strict sequence; otherwise, the order status will be messed up during consumption, which will affect the normal operation of the business. Therefore, the messages of this order must be produced and consumed in a certain sequence in the client and message queue. At the same time, the messages are sequentially dependent, and the processing of the next message must be dependent on the processing result of the preceding message.
Log synchronization: In the scenario of sequential event processing or real-time incremental data synchronization, ordered messages can also play a big role. For example, it is necessary to ensure that database operations are in sequence when MySQL binlogs are synchronized.
Finance: In certain matchmaking transaction scenarios such as certain securities transactions, the first bidder is given priority in the case of the same bidding price, so it is necessary to produce and consume ordered messages in a FIFO manner.
For detailed information about ordered messages, see Ordered Messages.





Distributed Cache Synchronization

When enterprises run promotional sales with numerous product categories and frequent price changes, repeated user queries for product prices can overload the network interface cards (NICs) of cache servers, slowing down page loading speeds. By leveraging the broadcasting consumption mode of TDMQ for RocketMQ, each price update message is consumed once by every node, effectively synchronizing price information across all required machines and replacing the traditional caching mechanism.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback