tencent cloud

TDMQ for RabbitMQ

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Introduction and Selection of the TDMQ Product Series
What Is TDMQ for RabbitMQ
Strengths
Use Cases
Description of Differences Between Managed Edition and Serverless Edition
Open-Source Version Support Description
Comparison with Open-Source RabbitMQ
High Availability
Use Limits
TDMQ for RabbitMQ-Related Concepts
Regions
Related Cloud Services
Billing
Billing Overview
Pricing
Billing Example
Convert to Monthly Subscription from Hourly Postpaid
Renewal
Viewing Consumption Details
Overdue Payments
Refund
Getting Started
Getting Started Guide
Step 1: Preparations
Step 2: Creating a RabbitMQ Cluster
Step 3: Configuring a Vhost
Step 4: Using the SDK to Send and Receive Messages
Step 5: Querying a Message
Step 6: Deleting Resources
User Guide
Usage Process Guide
Configuring the Account Permission
Creating a Cluster
Configuring a Vhost
Connecting to the Cluster
Managing Messages
Configure Advanced Feature
Managing the Cluster
Viewing Monitoring Data and Configuring Alarm Policy
Use Cases
Use Instructions of Use Cases
RabbitMQ Client Use Cases
RabbitMQ Message Reliability Use Cases
Usage Instructions for MQTT Protocol Supported by RabbitMQ
Migrate Cluster
Migrating RabbitMQ to Cloud
Step 1. Purchasing a TDMQ Instance
Step 2: Migrating Metadata to the Cloud
Step 3: Enabling Dual Read-Write
API Reference (Managed Edition)
API Overview
API Reference (Serverless Edition)
History
Introduction
API Category
Making API Requests
Relevant APIs for RabbitMQ Serverless PAAS Capacity
RabbitMQ Serverless Instance Management APIs
Data Types
Error Codes
SDK Documentation
SDK Overview
Spring Boot Starter Integration
Spring Cloud Stream Integration
Java SDK
Go SDK
Python SDK
PHP SDK
Security and Compliance
Permission Management
Network Security
Deletion Protection
Change Records
CloudAudit
FAQs
Service Level Agreement
Contact Us

Use Cases

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-01-04 14:53:46

Scenario of Flash Sales

Flash sales are a very common scenario in e-commerce systems, and there are many solutions available. Using TDMQ for RabbitMQ is considered one of the effective methods.
For complex inventory deduction scenarios (such as those involving product information or other systems), it is recommended to perform inventory deduction using the database. An asynchronous method can be used to handle high concurrency in inventory updates.
1. When a user places an order, the order is not generated immediately; instead, all orders are sequentially placed into a queue.
2. The order module obtains orders from the queue based on its own processing speed and performs the operation of "inventory deduction after orders are placed".
3. After the order is generated successfully, the user can proceed with payment.
This method is specifically designed for the scenario of flash sales, ensuring fairness based on the "first-come, first-served" principle. All users have the opportunity to place an order, and then wait for order processing and order generation (orders fail to be generated if the inventory is insufficient).




Priority Messages

When messages are consumed, if the importance of them varies, and higher-priority messages are desired to be consumed preferentially, the priority queue feature of TDMQ for RabbitMQ can be used in this case to ensure that messages with higher priority are consumed first.
See the following business scenario for reference:
For example, there is a scenario of an order payment reminder in the system. If customers place the order in the e-commerce system, the system will send it to the customer timely. If payment is not made within a specified time period, an SMS reminder will be sent to the customer. However, the processing method of the speed differentiates between major and minor customers. The payment reminders for major customers need to be processed with higher priority, while reminders for minor customers have lower priority.
The priority queue feature of TDMQ for RabbitMQ perfectly supports this scenario, preventing high-priority messages from being delayed. For example, orders from major customers are assigned a relatively higher priority to ensure timely processing, while others use the default priority.




Scenario of Delayed Messages

In the actual business system, there are requirements for sending delayed messages. If customers implement the delay logic themselves, ensuring reliability and delay accuracy can be challenging. Using a message middleware, such as TDMQ for RabbitMQ, can handle such requirements effectively. Scenarios for using delayed messages include:
In an order system, users have 30 minutes to complete payment after placing an order. If payment is not successful within this time range, the order will be processed as an exception. In this case, the delayed message capability of TDMQ for RabbitMQ can be used to handle these timed-out orders.
In an Internet of Things (IoT) system, users may want to remotely control smart devices to operate at a specified time using their mobile phones. In this case, the control instructions can be sent to the delay queue, which sends the control instructions to the smart devices at the specified time.




Message Broadcasting

Many business systems need to broadcast information to downstream systems. Using RPC to achieve this can create tight coupling and increase pressure on the upstream business systems. In this case, the fanout exchange of TDMQ for RabbitMQ can be used to handle these requirements. Applicable scenarios include:
In a massively multiplayer online game (MMO), it can be used for leaderboard updates or other global events.
In the sports news website, the fanout exchange can be used to distribute near-real-time score updates to the clients.
In a distributed system, it can be used to broadcast various status and configuration updates.
In a group chat, it can be used to distribute messages among participants.




Scenario of Flexible Routing

With the rise of microservice architectures, services are split more granularly, and service data is often sent as messages to different queues using carefully designed distribution policies. The flexible message routing capability of TDMQ for RabbitMQ can be fully used to distribute messages to target queues. Applicable scenarios include:
In a log processing scenario, logs are routed to different queues based on the type. For example, error logs are shipped to a separate processing queue with higher priority.
In an e-commerce logistics system, the shipment information is distributed to different consumers based on the region.
Complex routing scenarios.






Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan