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 create a topic in the CKafka console.
You have created an instance as instructed in Creating Instance.
Note:Creating a single-replica topic cannot guarantee the availability; therefore, you should choose it with caution.
The parameters are as detailed below:
Parameter | Default Value | Valid Values | Description |
---|---|---|---|
cleanup.policy | delete | delete/compact | Log 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 "producer" sets "request.required.acks" to 1, "min.insync.replicas" will specify the minimum number of replicas. |
unclean.leader.election.enable | true | true/false | This parameter specifies whether a replica not in ISR can be set as a leader. |
segment.ms | - | 5 mins–90 days | The segment shard rolling duration in ms. Minimum value: 86,400,000 ms. |
retention.ms | The message retention period of the instance | 60000 ms–90 days | The message retention period at the topic level. |
retention.bytes | The message retention size of the instance | 1–1024 GB | The message retention size at the topic level. If both the message retention period and message retention size are set for a topic, the actual message retention will be determined by which threshold is reached first. |
max.message.bytes | - | 1 KB–12 MB | The maximum message size at the topic level. If this parameter is left empty, it will be 1 MB by default. |
Was this page helpful?