You can choose the most appropriate migration method based on your actual business scenarios to migrate your business data to the cloud by following the steps below. This guide is mainly for data migration from CVM to CKafka, which can be done over the private network. If access to data stream over the public network is required, you need to activate the public IP access for your CKafka instance first.
The prerequisite for guaranteeing message ordering is to strictly limit data consumption to only one consumer. Therefore, timing of the migration is vital. The migration steps are as follows:
Detailed directions:
broker-list
to the VIP of the CKafka instance and topicName
to the topic name in the CKafka instance:
./kafka-console-producer.sh --broker-list xxx.xxx.xxx.xxx:9092 --topic topicName
--bootstrap-server
to the VIP of the CKafka instance:
./kafka-console-consumer.sh --bootstrap-server xxx.xxx.xxx.xxx:9092 --from-beginning --new-consumer --topic topicName --consumer.config ../config/consumer.properties
Note:The above commands are test commands. In actual business operations, just modify the broker address configured for the corresponding application and then restart the application.
If the requirement for message ordering is not high, it is possible to migrate the data while it is consumed by multiple consumers in parallel. The migration steps are as follows:
Detailed directions:
broker-list
to the VIP of the CKafka instance and topicName
to the topic name in the CKafka instance:
./kafka-console-producer.sh --broker-list xxx.xxx.xxx.xxx:9092 --topic topicName
--bootstrap-server
to the VIP of the CKafka instance:
./kafka-console-consumer.sh --bootstrap-server xxx.xxx.xxx.xxx:9092 --from-beginning --new-consumer --topic topicName --consumer.config ../config/consumer.properties
Note:The above commands are test commands. In actual business operations, just modify the broker address configured for the corresponding application and then restart the application.
Was this page helpful?