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. |
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 |
|
Edition type |
|
|
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.
-
Create a NAT gateway for VPC 1 that hosts the Message Queue for Apache Kafka instance.
For more information, see Internet NAT Gateway.
-
Associate an
elastic IP addresswith thenat gateway.For more information, see Associate an EIP with a cloud resource.
-
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
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.
In the left-side navigation pane, click Migration. On the page that appears, click the Cloud Migration tab.
-
On the Cloud Migration tab, click Create Task.
-
In the Create Cloud Migration Task panel, configure the following parameters.
-
On the Configure Basic Information tab, specify a Task Name and select a Destination Instance, and then click Next.
-
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
regionof the sourceinstance.China (Hangzhou)
Endpoint
The
endpointof the sourceinstance.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 IDof the sourceinstance.vsw-bp1gbjqsf53og****
Security Group
Select the
security groupof the sourceinstance.alikafka_pre-cn-7mz2****
Security Protocol
Select the
security protocolof the sourceinstance.-
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
topicACLs during data migration. This parameter appears after you click Configure Runtime Environment. The default value is Yes.-
Yes: Synchronizes
topicACLs from the sourceinstanceto the destinationinstance. If the sourceinstanceis aself-managed cluster, you must manually create SASL users on the destinationinstanceto synchronizetopicACLs. -
No: Does not synchronize
topicACLs from the sourceinstanceto the destinationinstance.
Yes
Synchronize Consumer Groups
Determines whether to synchronize
consumer groups from the sourceinstanceto the destinationinstanceduring 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 sourceinstanceto the destinationinstanceduring 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 sourceinstanceto synchronize to the destinationinstance. If you leave this parameter blank, alltopics 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 withlocal storageon the destinationinstance. If you leave this parameter blank,topics are created withcloud 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
endpointof the sourceinstance.192.168.XX.XX:9092
Security Group
Select the
security groupof the sourceinstance.alikafka_pre-cn-7mz2****
Security Protocol
Select the
security protocolof the sourceinstance.-
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
instanceduring data migration. This parameter appears after you click Configure Runtime Environment. The default value is Yes.Yes
Synchronize Topic ACLs
Determines whether to synchronize
topicACLs during data migration. This parameter appears after you click Configure Runtime Environment. The default value is Yes.-
Yes: Synchronizes
topicACLs from the sourceinstanceto the destinationinstance. If the sourceinstanceis aself-managed cluster, you must manually create SASL users on the destinationinstanceto synchronizetopicACLs. -
No: Does not synchronize
topicACLs from the sourceinstanceto the destinationinstance.
Yes
Synchronize Consumer Groups
Determines whether to synchronize
consumer groups from the sourceinstanceto the destinationinstanceduring 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 sourceinstanceto the destinationinstanceduring 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 sourceinstanceto synchronize to the destinationinstance. If you leave this parameter blank, alltopics 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 withlocal storageon the destinationinstance. If you leave this parameter blank,topics are created withcloud storage. This parameter appears after you click Configure Runtime Environment.test-topic
-
-
-
On the Configure Destination Service tab, click Create.
-
-
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
topicto 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 , set the
topicand reset method, and then click OK. For more information about resettingconsumer offsets, see Reset consumer offsets. -
To start or stop a task, select or . Then, in the Note dialog box, click OK.
-
To delete a task, select , and then click OK in the Note dialog box.