# Create a Kafka Topic

The Kafka Topic Creation screen allows users to create a new Kafka topic within a specified Kafka cluster. Below are the detailed steps and descriptions of the parameters users need to configure.

{% hint style="info" %}
**Prerequisite**: A Kafka cluster must already be deployed and it must be in an **Available** state. Ensure that your Apache Kafka cluster is up and running and accessible from the **Event Streams for Apache Kafka Clusters Overview** window.
{% endhint %}

1. In the **DCD**, go to **Menu** > **Data Analytics** > **Events Streams for Apache Kafka**.
2. From the list of clusters, select the Kafka cluster where you want to create the new topic.

![Select the desired cluster](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-e993b3c1604019e80745f3806f5ac2d6a2682d51%2Fkafka-with-cluster.png?alt=media)

3. Click the **Topics** tab.

![Click the Topics tab](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-584e1dad93329815fa6230f2caa322d8d44c42c9%2Fkafka-topics-tab.png?alt=media)

4. Click the **Create topic** button to open the topic creation dialog.

![Click the Topics tab](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-f4cbf24a7b4e49a5faa8605653448dff94b1a33b%2Fkafka-create-topic-button.png?alt=media)

5. In the **Create Topic** dialog, configure your topic by providing the following values:

![Configure your topic](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-daedb1c245a5f269e2e6078b5b36ed08cd22fd8b%2Fkafka-create-topic-dialog.png?alt=media)

{% hint style="info" %}
**Note:**

* We recommend using a replication factor of 3.

* The number of partitions should be equal to or greater than the number of brokers. If high throughput is a priority, you can opt for 2x or 3x the number of brokers or more.

* Be sure to use only multiples of your number of brokers for the number of partitions (3, 6, 9, 12, and so on), to avoid an uneven distribution of partitions.
  {% endhint %}

* **Name:** Enter the name of the new Kafka topic.

* **Replication Factor:** Specify the replication factor, which determines the number of copies of the data that will be maintained.

* **Number of Partitions:** Define the number of partitions for the topic. Partitions determine how the data is distributed across the brokers.

* **Retention Time (ms):** Set the retention time in milliseconds. This determines how long messages are retained in the topic. If set to `-1`, no time limit is applied.

* **Retention Segment Size (B):** Specify the retention segment size in bytes. This is the size at which log segments are rolled over.

{% hint style="info" %}
**Note**: The value must be greater than or equal to 14 bytes.
{% endhint %}

6. Click **Create** to finalize the topic creation process.

{% hint style="success" %}
**Result:** The Kafka cluster is successfully created.
{% endhint %}
