Data Synchronization

更新时间:
复制 MD 格式

ApsaraMQ for Kafka allows you to synchronize message data from a source Kafka instance to a target Kafka instance. You can create synchronization tasks in same-account or cross-account scenarios, and configure the topics, compute resources, task concurrency, compression type, and offset reset strategy as needed. Data synchronization is designed for long-term inter-instance data transfer scenarios such as data distribution, backup, and disaster recovery.

Usage limits

This feature is currently available by request. To enable it, submit a support ticket.

Billing

Data synchronization is billed based on CU. For details, see CU Postpaid.

If cross-account or cross-VPC data synchronization is involved, you must also pay VPC data transfer fees. For details, see VPC data transfer postpaid.

Prerequisites

Before creating a cross-account data synchronization task, ensure that the source or target instance account has completed authorization. For more information, see Authorization management. After authorization, the authorized account can select the corresponding instance as the source or target when creating a synchronization task.

Create a data synchronization task

  1. Log on to the ApsaraMQ for Kafka console.

  2. In the left-side navigation pane, select Data Synchronization.

  3. On the Data Synchronization page, click Create Task.

  4. On the Create Synchronization Task page, complete the configuration as instructed.

Step 1: Configure basic information

Parameter

Description

Task name

Enter a task name. We recommend that you use a name that identifies the business purpose, source instance, and target instance to simplify O&M and troubleshooting.

After configuration, click Next.

Step 2: Configure the source service

Parameter

Description

Cross-account instance

Specify whether the source instance belongs to another Alibaba Cloud account. If yes, the source instance account must complete authorization in advance.

Source cluster instance

Select the source Kafka instance to read data from.

Sync all Topics

Specify whether to synchronize all topics from the source instance. If you select No, specify the topics to synchronize as prompted.

CU

Select the compute resource specification. A higher CU value generally provides stronger synchronization capability. For details, see the specifications on the page.

Number of tasks

Select the number of concurrent synchronization tasks.

Compression type

Select the compression type for messages written to the target instance. Choose based on your compatibility requirements and compression efficiency.

Message offset reset strategy

Select the message offset reset strategy for the task.

After configuration, click Next.

Step 3: Configure the target service

Parameter

Description

Target cluster

Select the target Kafka instance to receive the synchronized data. If the target instance belongs to another account, that account must complete authorization in advance.

After confirming the configuration, click Create Synchronization Task.

Authorization management

For cross-account data synchronization, the instance owner must first authorize the other account. After authorization, the authorized account can select the instance as the source or target when creating synchronization tasks.

  1. On the Data Synchronization page, go to Authorization Management.

  2. Click Create Authorization.

  3. Configure the following parameters.

Parameter

Description

Authorized UID

Enter the UID of the Alibaba Cloud account to authorize. After authorization, this account can use the specified instance in data synchronization tasks.

Authorization purpose

Select the role of the authorized instance in data synchronization. You can select Read as source or Write as target.

Authorized instance

Select the Kafka instance to authorize for the other account.

Step 4: Click OK to complete authorization.

Next steps

After the task is created, you can view its status, synchronization progress, and runtime details on the Data Synchronization page. We recommend that you verify the topics, message writing status, and consumption chain in the target instance meet expectations before switching traffic.