Configuring Automatic Topic Creation
Automatic Topic Creation indicates that a topic will be automatically created when a message is produced in or consumed from a topic that does not exist. By default, the topic has parameters listed in Table 1.
The following parameters of cluster instances can be changed on the Parameters page: log.retention.hours (retention period), default.replication.factor (replica quantity), or num.partitions (partition quantity). The value will be used in later topics that are automatically created.
For example, assume that num.partitions is changed to 5, an automatically created topic has parameters listed in Table 1.
Parameter |
Default Value (Single-node) |
Default Value (Cluster) |
Modified To (Cluster) |
---|---|---|---|
Partitions |
1 |
3 |
5 |
Replicas |
1 |
3 |
3 |
Aging Time (h) |
72 |
72 |
72 |
Synchronous Replication |
Disabled |
Disabled |
Disabled |
Synchronous Flushing |
Disabled |
Disabled |
Disabled |
Message Timestamp |
CreateTime |
CreateTime |
CreateTime |
Max. Message Size (bytes) |
10,485,760 |
10,485,760 |
10,485,760 |
Notes and Constraints
Enabling or disabling automatic topic creation may restart the instance.
Procedure
- Log in to the console.
- Click
in the upper left corner to select the region where your instance is located.
- Click
and choose Application > Distributed Message Service (for Kafka) to open the console of DMS for Kafka.
- Click the desired Kafka instance to view its details.
- In the Instance Information area, click
or
next to Automatic Topic Creation. The Confirm dialog box is displayed.
- Click OK. The Background Tasks page is displayed. Automatic topic creation has been configured when the task is in the Successful state.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.