tencent cloud

TDMQ for RocketMQ

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Introduction and Selection of the TDMQ Product Series
What Is TDMQ for RocketMQ
Strengths
Scenarios
Product Series
Comparison with Open-Source RocketMQ
High Availability
Quotas and Limits
Supported Regions
Basic Concepts
Billing
Billing Overview
Pricing
Billing Examples
Pay-as-you-go Switch to Monthly Subscription (5.x)
Renewal
Viewing Consumption Details
Refund
Overdue Payments
Getting Started
Getting Started Guide
Preparations
Step 1: Creating TDMQ for RocketMQ Resources
Step 2: Using the SDK to Send and Receive Messages (Recommended)
Step 2: Running the TDMQ for RocketMQ Client (Optional)
Step 3: Querying Messages
Step 4: Deleting Resources
User Guide
Usage Process Guide
Configuring Account Permissions
Creating the Cluster
Configuring the Namespace
Configuring the Topic
Configuring the Group
Connecting to the Cluster
Managing Messages
Managing the Cluster
Viewing Monitoring Data and Configuring Alarms
Cross-Cluster Message Replication
Use Cases
Naming Conventions for Common Concepts of TDMQ for RocketMQ
RocketMQ Client Use Cases
RocketMQ Performance Load Testing and Capacity Assessment
Access over HTTP
Client Risk Descriptions and Update Guide
Migration Guide for TencentCloud API Operations Related to RocketMQ 4.x Cluster Roles
Migration Guide
Disruptive Migration
Seamless Migration
Developer Guide
Message Types
Message Filtering
Message Retries
POP Consumption Mode (5.x)
Clustering Consumption and Broadcasting Consumption
Subscription Relationship Consistency
Traffic Throttling
​​API Reference(5.x)
History
API Category
Making API Requests
Topic APIs
Consumer Group APIs
Message APIs
Role Authentication APIs
Hitless Migration APIs
Cloud Migration APIs
Cluster APIs
Data Types
Error Codes
​​API Reference(4.x)
SDK Reference
SDK Overview
5.x SDK
4.x SDK
Security and Compliance
Permission Management
CloudAudit
Deletion Protection
FAQs
4.x Instance FAQs
Agreements
TDMQ for RocketMQ Service Level Agreement
Contact Us

Message Service Data Flow Migration

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-01-23 17:36:45

Overview

Through a metadata migration task, you can synchronize the metadata of your self-built RocketMQ cluster to TDMQ for RocketMQ. After completing the metadata migration, you need to modify the access information of the producer and consumer clusters and migrate them from the self-built RocketMQ cluster to TDMQ for RocketMQ. Ultimately, this enables all message sending and receiving operations to be conducted on the new RocketMQ cluster.
Note
In message service migration, only the message production and consumption linkages are migrated, and the message data on the original RocketMQ cluster is not migrated. Only migration to exclusive clusters is supported. Migration to shared clusters will be supported after the open beta ends.

Migration Steps

This document mainly introduces the method of migrating message services using the dual-read dual-write and phased release approaches. During the migration process, both producer and consumer clusters can simultaneously produce and consume messages on the original RocketMQ cluster and the new RocketMQ cluster. This ensures no data backlog occurs due to migration, enabling a smooth business transition. The following diagram shows the solution and operation steps.



The operation steps are as follows:
1. Create a TDMQ for RocketMQ cluster, migrate the metadata, and obtain the required client information in the console, such as the access point, AccessKey, and SecretKey of the new cluster.
2. Modify the access information of certain nodes in the consumer cluster to connect corresponding consumers to the new TDMQ for RocketMQ cluster. They will consume messages in the new cluster, while the remaining consumers will continue to consume messages in the original RocketMQ cluster.
3. Modify the access information of certain nodes in the producer cluster to connect corresponding producers to the new TDMQ for RocketMQ cluster. They will send messages to the new cluster, while the remaining producers will continue to send messages to the original RocketMQ cluster. To prevent message duplication or loss, implement the idempotency logic for message consumption in advance.
4. Connect the remaining producers to the new TDMQ for RocketMQ cluster. Then, all messages will be sent to the new cluster.
5. Check whether there are backlogged messages that are not consumed in the original RocketMQ cluster, and if not, connect the remaining consumers to the new TDMQ for RocketMQ cluster. At this point, the migration is completed.
Note
If you do not follow the above steps strictly, for example, if you switch producers first and then consumers, message loss may occur.
Before you switch the remaining consumers, make sure that all messages in the original RocketMQ cluster have been consumed. Otherwise, message loss may occur. You can view the message backlog in the original RocketMQ cluster to check whether message consumption has completed.

Migration Process Diagram





Possible Issues

Out-of-Order

Due to the cluster switch, the order of messages cannot be guaranteed during the switch process. The switch may cause partial out-of-order.

Message Duplication

Theoretically, duplication should not occur, but it may happen in extreme cases. For example, during the switch, a consumer consumes a message but has not yet sent an acknowledgment to the server (the original RocketMQ cluster). This causes the message to enter the retry queue, leading to duplicate consumption. Implementing idempotency processing logic for messages can avoid this issue.

Consumption Delay

During the read-write switch process, the reassignment of partitions requires rebalance between queues and consumer clients, which may cause temporary consumption delays. No additional action is required if this occurs. Normal consumption will resume after the switch is complete.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan