# 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](/files/tgIN1YKsWnsQqmU5SSZd)

3. Click the **Topics** tab.

![Click the Topics tab](/files/YBGDW2Ur4FVw2smXQueh)

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

![Click the Topics tab](/files/GUFBYUsapOLOCTRvOFcH)

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

![Configure your topic](/files/Yld4blQNUw7sI6FgTsBA)

{% 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/cloud/data-analytics/kafka/dcd-howtos/create-kafka-topic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
