All Products
Search
Document Center

ApsaraMQ for Kafka:Cloud migration

Last Updated:Jul 01, 2026

Message Queue for Apache Kafka provides a fully managed, maintenance-free cloud migration service to synchronize data between self-managed clusters or cross-cloud instances and Message Queue for Apache Kafka instances. After the migration is complete, the metadata (Topic and Group configuration information) and message data from the source cluster are synchronized to the target instance. The metadata of the target instance remains consistent with the metadata of the source cluster and is continuously updated.

Prerequisites

You have purchased and deployed a ApsaraMQ for Kafka instance that meets the following requirements:

Item

Description

Status

Running

Version

The latest minor version of 2.2.0 or 2.6.2.

Note

You can view the status and version of your instance in the Enter Basic Information section on the Instances page of the Message Queue for Apache Kafka console.

Limitations

The cloud migration feature of ApsaraMQ for Kafka has the following limitations:

Item

Limit

Quantity

You can create a maximum of 20 migration tasks for each instance. The cloud migration and connector features share resources within a single instance.

Edition type

  • Serverless instance

  • For non-Serverless instances: Professional Edition (High Write) or Professional Edition (High Read).

Source instance version

The open source version must be 1.0.0 or later.

Billing

The cloud migration component for ApsaraMQ for Kafka will start charging on August 1, 2026. For more information, see CU Postpaid.

Network requirements

If you need to use the cloud migration feature to synchronize data from a self-managed instance on the public internet to ApsaraMQ for Kafka, or synchronize data cross-region from a ApsaraMQ for Kafka instance in a VPC to a ApsaraMQ for Kafka instance in another VPC, you need to enable internet access for the instance and then synchronize the data over the internet. For more information, see Enable internet access (Optional).

If you need to use the cloud migration feature to synchronize data from an instance in one VPC to a ApsaraMQ for Kafka instance in another VPC, the ApsaraMQ for Kafka and ApsaraMQ for Kafka regions support automatic VPC connection. In other regions, you must manually connect the VPCs. For more information, see Connect VPCs across regions.

Enable internet access (optional)

To use the cloud migration feature for cross-region access to other Alibaba Cloud services or public endpoints, you must enable internet access.

  1. Create a NAT gateway for VPC 1 that hosts the Message Queue for Apache Kafka instance.

    For more information, see Internet NAT Gateway.

  2. Associate an elastic IP address with the nat gateway.

    For more information, see Associate an EIP with a cloud resource.

  3. Create an SNAT entry for the vSwitch used by the Message Queue for Apache Kafka instance in VPC 1.

    For more information, see Create and manage SNAT entries.

Create and deploy a cloud migration task

  1. Log on to the ApsaraMQ for Kafka console. In the Resource Distribution section of the Overview page, select the region where the ApsaraMQ for Kafka instance that you want to manage resides.

  2. In the left-side navigation pane, click Migration. On the page that appears, click the Cloud Migration tab.

  3. On the Cloud Migration tab, click Create Task.

  4. In the Create Cloud Migration Task panel, configure the following parameters.

    1. On the Configure Basic Information tab, specify a Task Name and select a Destination Instance, and then click Next.

    2. On the Configure Source Service tab, configure the source service parameters, and then click Next.

      • If you select VPC (Interconnection Between Self-managed Instance and VPC) for Source Instance Type, configure the following parameters.

        Parameter

        Description

        Example

        Source Region

        Select the region of the source instance.

        China (Hangzhou)

        Endpoint

        The endpoint of the source instance.

        192.168.XX.XX:9092

        VPC ID

        This value is automatically populated based on the source instance's VPC and cannot be changed.

        vpc-test-c****

        vSwitch ID

        The vSwitch ID of the source instance.

        vsw-bp1gbjqsf53og****

        Security Group

        Select the security group of the source instance.

        alikafka_pre-cn-7mz2****

        Security Protocol

        Select the security protocol of the source instance.

        • PLAINTEXT

        • SASL_PLAINTEXT

          • SASL Username: Enter the SASL username.

          • SASL Password: Enter the SASL password.

          • SASL mechanism: The SASL authentication mechanism. Valid values: PLAIN, SCRAM-SHA-256, and SCRAM-SHA-512.

        • SASL_SSL

          • SASL Username: Enter the SASL username.

          • SASL Password: Enter the SASL password.

          • SASL mechanism: The SASL authentication mechanism. Valid values: PLAIN, SCRAM-SHA-256, and SCRAM-SHA-512.

          • SSL Truststore File: Upload the certificate file.

          • SSL Truststore Password: Enter the password of the certificate.

          • SSL Endpoint Identification Algorithm: The algorithm used to verify the server's identity during SSL communication, which helps prevent man-in-the-middle attacks. You can enter https, http, or leave it blank.

        PLAINTEXT

        Number of Tasks

        Select the number of tasks for data synchronization. Valid values:

        • 1

        • 6

        • 12

        12

        Synchronize SASL Users

        Determines whether to synchronize SASL users during data migration. This parameter appears after you click Configure Runtime Environment. The default value is Yes.

        Yes

        Synchronize Topic ACLs

        Determines whether to synchronize topic ACLs during data migration. This parameter appears after you click Configure Runtime Environment. The default value is Yes.

        • Yes: Synchronizes topic ACLs from the source instance to the destination instance. If the source instance is a self-managed cluster, you must manually create SASL users on the destination instance to synchronize topic ACLs.

        • No: Does not synchronize topic ACLs from the source instance to the destination instance.

        Yes

        Synchronize Consumer Groups

        Determines whether to synchronize consumer groups from the source instance to the destination instance during data migration. This parameter appears after you click Configure Runtime Environment. The default value is Yes.

        Yes

        Synchronize Consumer Offsets

        Determines whether to synchronize consumer offsets from the source instance to the destination instance during data migration. This parameter appears only when you click Configure Runtime Environment and set Synchronize Consumer Groups to Yes. The default value is Yes.

        Yes

        Topic

        The topics on the source instance to synchronize to the destination instance. If you leave this parameter blank, all topics are synchronized. This parameter appears after you click Configure Runtime Environment.

        test-topic

        Create Topics to Use Local Storage

        Specify which non-compacted topics to create with local storage on the destination instance. If you leave this parameter blank, topics are created with cloud storage. This parameter appears after you click Configure Runtime Environment.

        test-topic

      • If you select Public Network (IDC or Cross-cloud Instance) for Source Instance Type, configure the following parameters.

        Parameter

        Description

        Example

        Endpoint

        The endpoint of the source instance.

        192.168.XX.XX:9092

        Security Group

        Select the security group of the source instance.

        alikafka_pre-cn-7mz2****

        Security Protocol

        Select the security protocol of the source instance.

        • PLAINTEXT

        • SASL_PLAINTEXT

          • SASL Username: Enter the SASL username.

          • SASL Password: Enter the SASL password.

          • SASL mechanism: The SASL authentication mechanism. Valid values: PLAIN, SCRAM-SHA-256, and SCRAM-SHA-512.

        • SASL_SSL

          • SASL Username: Enter the SASL username.

          • SASL Password: Enter the SASL password.

          • SASL mechanism: The SASL authentication mechanism. Valid values: PLAIN, SCRAM-SHA-256, and SCRAM-SHA-512.

          • SSL Truststore File: Upload the certificate file.

          • SSL Truststore Password: Enter the password of the certificate.

          • SSL Endpoint Identification Algorithm: The algorithm used to verify the server's identity during SSL communication, which helps prevent man-in-the-middle attacks. You can enter https, http, or leave it blank.

        PLAINTEXT

        Number of Tasks

        Select the number of tasks for data synchronization. Valid values:

        • 1

        • 6

        • 12

        12

        Synchronize SASL Users

        Determines whether to synchronize SASL user information to the destination instance during data migration. This parameter appears after you click Configure Runtime Environment. The default value is Yes.

        Yes

        Synchronize Topic ACLs

        Determines whether to synchronize topic ACLs during data migration. This parameter appears after you click Configure Runtime Environment. The default value is Yes.

        • Yes: Synchronizes topic ACLs from the source instance to the destination instance. If the source instance is a self-managed cluster, you must manually create SASL users on the destination instance to synchronize topic ACLs.

        • No: Does not synchronize topic ACLs from the source instance to the destination instance.

        Yes

        Synchronize Consumer Groups

        Determines whether to synchronize consumer groups from the source instance to the destination instance during data migration. This parameter appears after you click Configure Runtime Environment. The default value is Yes.

        Yes

        Synchronize Consumer Offsets

        Determines whether to synchronize consumer offsets from the source instance to the destination instance during data migration. This parameter appears only when you click Configure Runtime Environment and set Synchronize Consumer Groups to Yes. The default value is Yes.

        Yes

        Topic

        The topics on the source instance to synchronize to the destination instance. If you leave this parameter blank, all topics are synchronized. This parameter appears after you click Configure Runtime Environment.

        test-topic

        Create Topics to Use Local Storage

        Specify which non-compacted topics to create with local storage on the destination instance. If you leave this parameter blank, topics are created with cloud storage. This parameter appears after you click Configure Runtime Environment.

        test-topic

    3. On the Configure Destination Service tab, click Create.

  5. After the task is created, on the Migration page, select the target instance from the Instance drop-down list. In the instance list, find the task that you created and click Deploy in the Actions column.

    On the Migration page, if the task Status is Running, the task is successfully deployed.

Other operations

On the Migration page, select the relevant instance from the Instance drop-down list, find the task, and use the options in the Actions column.

  • View task details: Click Details. On the task details page, view the Basic Information, Source Service, Destination Service, and Runtime Environment.

  • View synchronization progress: Click Synchronization Progress, select the topic to view, and then click OK.

  • Modify task configuration: Click Modify Configuration. In the panel that appears, modify the task parameters as needed.

  • Reset consumer offsets: Choose More > Reset Consumer Offset, set the topic and reset method, and then click OK. For more information about resetting consumer offsets, see Reset consumer offsets.

  • To start or stop a task, select More > Suspend or More > Enable. Then, in the Note dialog box, click OK.

  • To delete a task, select More > Delete, and then click OK in the Note dialog box.