Topic is a category name where messages are stored and published. With CKafka, producers write messages to topics, and consumers read messages from topics. To enable horizontal scaling, a topic is divided into multiple partitions. This allows you to horizontally scale your resources by adding more partitions in case of performance bottlenecks.
This document describes how to manage the topics under an existing instance in the CKafka console.
Log in to the CKafka console.
On the Instance List page, click the ID/Name of the target instance to enter the instance details page.
On the instance details page, click Topic Management at the top and click Create.
In the Create Topic window, set the number of partitions and replicas and other parameters.
|Partition Name||Partition name|
|Leader||The leader processes all read/write requests in the partition, and the follower passively and periodically copies the data on the leader.|
|ISR||Replicas with synced messages|
|Start Offset||The last position of message consumption|
|End Offset||The last position of message write. If the end offset is greater than the start offset, there are messages that have not been consumed yet|
|Messages||Number of stored messages|
|Unsynced Replicas||Number of unsynced replicas. You can filter partitions with unsynced replicas|
- Deleting a topic will also delete the messages stored in the topic. Please do so with caution.
- Topic deletion is an async operation. After you finish the steps required to delete a topic, it takes 1 minute for the configuration to take effect with ZooKeeper. During this period, if you try to create a topic with the same name as the deleted one, the system will return the error code
10011. Please wait and try again later.
The parameters are described as follows:
|Parameter||Default Value||Valid Values||Description|
|cleanup.policy||delete||delete/compact||Logs can be deleted by retention time or can be compacted by key (the compact mode is required for Kafka Connect).|
|min.insync.replicas||1||-||When the "producer" sets
|unclean.leader.election.enable||true||true/false||Whether to allow the setting of a replica not in the ISR set as the leader.|
|segment.ms||-||1–90 days||The period (ms) after which a segment is rolled, with the minimum value being 86,400,000 ms.|
|retention.ms||The message retention time of the instance||60000 ms–90 days||Message retention time at the topic level.|
|max.message.bytes||-||0–8 MB||Maximum message size at the topic level. If it is not set, the instance-level maximum message size (1 MB) is used by default.|