tencent cloud

All product documents
TDMQ for CKafka
Creating Topic
Last updated: 2025-04-08 17:55:26
Creating Topic
Last updated: 2025-04-08 17:55:26

Overview

Topic is the name of a category where messages can be stored and published. CKafka uses the concept of topic externally, that is, a producer writes messages to a topic, while a consumer read messages from it. To implement horizontal scaling, a topic actually consists of multiple partitions. When a performance bottleneck occurs, you can scale out the topic by adding more partitions.
This document describes how to create a topic in the CKafka console.

Prerequisites

You have created an instance as instructed in Creating Instance.

Directions

Step 1. Create a topic

1. Log in to the CKafka console.
2. In the instance list, click the ID/Name of your instance to enter the instance details page.
3. On the instance details page, click Topic Management at the top and click Create.
4. In the Create Topic window, set the Partition Count, Replica Count, and other parameters.
Parameter
Description
Name
Topic name, cannot be changed after input. The name can only contain letters, numbers, underscores, hyphens, and periods. Does not support starting with double underscores.
Partition Count
A concept of physical partition. A Topic can contain one or more partitions. CKafka uses partitions as the allocation unit. The default deployment architecture has at least 3 nodes. It is recommended to start with at least 3 partitions for a more balanced data distribution. For partition count configuration, refer to the Parameter Configuration Instructions.
Number of Replicas
The number of replicas of a Partition is used to ensure high availability of the Partition. To ensure data reliability, 2 replicas are enabled by default. The number of replicas is also counted as the number of partitions. For example, if a customer creates 1 Topic, 6 partitions, and 2 replicas, then the total Partition quota used is 1 × 6 × 2 = 12.
Notes:
Setting it to a single replica cannot guarantee availability. Proceed with caution.
Tag
Tags are used to manage resources by category from different dimensions. For more details, see Tag Management.
retention.ms
Message retention time in the Topic dimension, ranging from 1 minute to 90 days.
5. (Optional) Click to expand advanced configuration and set the following parameters:
Parameter Name
Default Value
Parameter Range
Description
Message Timestamp Type
LogAppendTime (Recommended)
LogAppendTime/CreateTime
CreateTime indicates the local time of the client. Since the client time may deviate from the server time, you need to check whether the written time is the correct time.
LogAppendTime indicates the time when the server-side Broker receives a message.
Predefined ACL Policy
Off
Enable / Disable
Check the preconfigured ACL policy. For details about the ACL policy, see Configure ACL Policy.
cleanup.policy
delete
delete/compact
Supports deleting logs by storage time or compressing logs by key (compact mode is required when using Kafka Connect).
min.insync.replicas
1
Cannot be larger than the secondary quantity.
When the producer sets request.required.acks to 1, min.insync.replicas specifies the minimum number of replicas.
unclean.leader.election.enable
true
true/false
Specifies whether it is possible to set replicas that are not in the ISR as leaders.
segment.ms
/
1 to 90 Days
The duration of fragment scrolling, in milliseconds.
retention.bytes
Defaults to the message retention size of the instance.
1 to 1,024 GB
number of partitions * rentention.bytes = message retention size of the current topic. For a topic, if both message retention time and message retention size are set, the actual message retention will be based on the threshold that is reached first.
max.message.bytes
-
1 KB to 12 MB
When sending data, the client aggregates data sent to the same partition and sends them in a unified manner. The server compares the message size of each batch.
6.Click Submit to complete Topic creation.

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support