In a Message Queue for Apache Kafka instance, you can recreate the Topic that you deleted, and the number of partitions is smaller than the number of partitions configured in the previous creation. The following message is displayed.
The topic is created. The number of partitions cannot be less than the number of the previously configured partitions. The topic is reset to XX.
When you delete a Topic, the routing information of the Topic is not completely cleared. As a result, the number of partitions cannot be reduced when the Topic is re-created.
Alibaba Cloud reminds you that:
- When you perform operations that have risks, such as modifying instance configurations or data, check the disaster recovery and fault tolerance capabilities of the instances to ensure data security.
- Before you modify the configurations and data of instances including but not limited to ECS and RDS instances, we recommend that you create snapshots or enable RDS log backup.
- If you have authorized or submitted sensitive information such as the logon account and password in the Alibaba Cloud Management Console, we recommend that you modify such information in a timely manner.
Upgrade the Message Queue for Apache Kafka instance to the latest version, then recreate the Topic or delete the Topic to clear its route information. After the process is completed, create the Topic again, and you can freely specify the number of partitions. Follow these steps:
- Login Message Queue for Apache Kafka console.
- In the left-side navigation pane, choose overview.
- Click an instance ID, details button.
- In instance details page, view the minor version information.
- Non-Latest version
Upgrade the Kafka instance to the latest version. For more information, see upgrade the instance service version.
- Latest Version
Please proceed to the next step.
- Non-Latest version
- In the left-side navigation pane, click Topics.
- Re-create the previously deleted Topic, and then delete the Topic again.
- After the preceding operations, you can create the Topic and specify the number of partitions.
- Message Queue for Apache Kafka