Creating an Apache Kafka® topic#
When working with Apache Kafka®, while it is possible to configure it to automatically create topics when a message is produced to a non-existent topic, it is generally recommended to create topics beforehand, especially in production environments. This approach offers several advantages:
It allows you to define specific topic settings, such as the number of partitions, replication factor, retention period, and more.
It helps prevent the generation of incorrect topics due to typos or other mistakes.
Create an Apache Kafka® topic#
To create a new topic using the Aiven Console, follow these steps:
Log in to Aiven Console and select the Aiven for Apache Kafka® service where you want to create the topic.
From the left sidebar, select Topics.
Select Add topic to create a new topic and enter a name for the topic.
If required, enable advanced configurations for the topic by toggling the corresponding option.
In the Topic advanced configuration section, you can set properties such as the replication factor, number of partitions, and other settings. These settings can be modified later if needed.
Select Add topic. The new topic will be visible immediately, but may take a few minutes before you can update its settings.