Skip to main content

Module topic_name

Module topic_name 

Source
Expand description

The topic-name rules of Apache Kafka’s org.apache.kafka.common.internals.Topic.

A topic name becomes part of a filesystem path: the partition directory is <log_dir>/<topic>-<partition>. A name that holds a /, or that is . or .., gives a path outside the log directory. validate_topic_name is the one check. Every path that creates a topic, and every path that creates or removes a partition directory from a name, calls it. A name that passes gives a partition directory that is a direct child of the log directory.

The error text is Kafka’s text, because CreateTopics sends it to the client as the error message.

Enums§

InvalidTopicName
Why a topic name is invalid. The display text is the message of Kafka’s InvalidTopicException from Topic.validate.

Constants§

MAX_TOPIC_NAME_LENGTH
Longest topic name Kafka accepts, in UTF-16 code units (Topic.MAX_NAME_LENGTH).

Functions§

topic_names_collide
Whether a and b are the same name after . becomes _ (Kafka’s Topic.hasCollision).
validate_topic_name
Checks name against Kafka’s Topic.validate, in Kafka’s order.