tencent cloud

Cross-Topic Message Replication
Last updated:2026-01-23 17:34:05
Cross-Topic Message Replication
Last updated: 2026-01-23 17:34:05

Scenarios

TDMQ for RocketMQ supports message synchronization between two clusters (such as between two 4.x clusters, between two 5.x clusters, and between 4.x and 5.x clusters) within the same region or across different regions. You can replicate messages from a specific topic in cluster A to a specific topic in cluster B. During topic message replication, TDMQ for RocketMQ supports message filtering based on specific conditions (such as tags or SQL expressions), allows enabling/disabling of replication tasks at any time, and enables monitoring of replication task progress and health status.

Billing Rules

The cross-cluster message replication feature is currently free of charge. Before charging starts, Tencent Cloud will notify customers multiple times a month in advance through the message center, short messages, and emails.

Operation Steps

Creating a Task

Log in to the TDMQ for RocketMQ console, click Cross-Cluster Replication > Create Task in the left sidebar, and specify the following fields as required:
Task Name: It must be up to 200 characters in length and can contain only Chinese characters, digits, letters, hyphens (-), and underscores (_).
Source Topic: Select the required region, cluster, namespace, and topic from the drop-down lists. If you cannot locate the required cluster or topic, you can create it on the Cluster List page.
Target Topic: Select the required region, cluster, namespace, and topic from the drop-down lists. If you cannot locate the required cluster or topic, you can create it on the Cluster List page.
Filter Type: Tag-based filtering and SQL-based filtering are supported.
Replication Start Offset: Replication can be started from the latest checkpoint or a specified time point.
Whether to Start Task Now: If the switch is enabled, messages are replicated based on the task configuration after the task is created.

After you click Create Task, the Task List page is displayed. After the task is initialized, it has been created.
The replication task you create is one-way. That is, if you create a replication task from Topic A to Topic B, the messages in Topic A are automatically replicated to Topic B. If you need a two-way replication task, you need to create an additional replication task from Topic B to Topic A.

Replicating a Task

You can copy the configuration of an existing task to quickly create a task, facilitating message replication task creation.
Log in to the TDMQ for RocketMQ console, click Cross-Cluster Replication in the left sidebar, select a created task, and click Create Similar in the operation column. The parameters same as those of the replication task are automatically specified on the task creation page. You only need to make simple modifications to create a task. (The console does not allow creating tasks with the same configurations.)

Viewing Task Details

After a task is created, you can see the newly added replication task on the Task List page and quickly view its status. Click Start/Pause in the operation column to quickly start or pause the task.
You cannot modify the configuration of running tasks. To modify the configuration of a replication task, pause the task and then click Edit in the operation column. Alternatively, go to the Task Details page and click Edit in the upper-right corner of the Basic Information section to modify the task information.
You can click the task name to go to the task details page and view detailed configurations, such as filtering rules and start time. In the Monitoring section, you can view real-time monitoring data of the message replication task, including the total number of source messages consumed, the number of messages that failed to be replicated, and the message replication delay.


Handling Exceptions

Normally, the status bar displays Running or Paused. If the status is Start Failed, you need to check the task running status and whether the detailed task configurations are correct, such as whether the SQL expression is valid. Hovering the cursor over the failed status will show specific failure reasons.

If the task status is failed, you can click Edit in the operation column, or go to the Task Details page and click Edit in the upper-right corner of the Basic Information section to correct the task information.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback