> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/home/data-analytics/kafka/dcd-howtos/create-kafka-topic.md).

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
