Chapters

Kafka Topic Naming Conventions

What are the naming conventions for a Kafka topic?


Kafka topic can have any names you want. It is very important to choose a naming convention in your company to maintain some kind of consistency.

If you need ideas, I recommend reading this blog: https://cnr.sh/essays/how-paint-bike-shed-kafka-topic-naming-conventions

Common structures adopted are hierarchical such as <department name>.<team name>.<dataset name>.<data format> (you can define your own).

Suffixing by <data format> can be a good way to indicate in advance how to consume a topic for example .avro , .json, .text, .protobuf, .csv, .log

Valid characters for Kafka topics are the ASCII alphanumerics, ., _, and - and it is better not to mix . and _ to avoid metric namespace collisions:

1 org.apache.kafka.common.errors.InvalidTopicException: Topic 'test.1' collides with existing topics: test_1

Was this content helpful?
0
0
PreviousHow to send Large Messages in Apache Kafka?
NextKafka Producers Advanced

Conduktor & Kafka Topic Names

Conduktor Platform makes it effortless to name your topics and group them smartly. The Platform can even enforce naming conventions across your team, ensuring every new topic adheres to your data governance. Try it now!

Conduktor Topic as a service screenshot
Topic as a Service