Designing Topic Naming Conventions in Kafka

Designing Topic Naming Conventions in Kafka

How to choose clear, consistent and future-proof names for Kafka topics, what the platform allows, which parts a good name should carry, and how to enforce the rules so a cluster stays understandable as it grows from ten topics to ten thousand.

Picture a huge library where every book is stored under a title its author picked on a whim. One shelf holds “Stuff”, another “stuff_new”, a third “Stuff FINAL v2”, and a fourth “misc-do-not-touch”. Finding a book takes hours. Nobody knows who owns which shelf, which books are safe to borrow, or which ones are old copies. Now picture a library where every shelf label follows one pattern: subject, section, and edition. Anyone can walk in and find what they need in seconds.

A Kafka cluster is that library, and a topic name is the shelf label. Names look like a tiny detail, yet they decide how easy it is to find data, protect it, monitor it, and change it later. Worse, a topic name cannot be changed once created. In this guide you will learn what a naming convention is, what Kafka itself allows, which pieces a good name should hold, how to handle versions, environments, security and internal topics, and how to enforce the rules with automation so that they last.

1What a Topic Naming Convention Is

A naming convention is a written agreement about how every topic in your organization is named.

Start with the basic words. Apache Kafka is a system that stores streams of messages and lets many programs read and write them. A message, also called a record, is one small piece of data, such as “order 1001 was paid”. A topic is a named place where messages of one kind are stored, like a labeled folder. Programs that write messages are producers, and programs that read them are consumers. Servers that hold the data are brokers.

A naming convention is a set of rules that says how a topic name is built. For example: “the name has four parts separated by dots, in lowercase: environment, domain, entity, and version”. If every team follows the rule, a name such as prod.sales.order-paid.v1 tells you at a glance where the data comes from, what it is, and which edition you are looking at.

The convention is not a Kafka feature. Kafka only checks a few basic character rules. The convention is a human and process agreement, ideally backed by tools that check it automatically. Think of it as the grammar of your cluster.

Everyday analogy

Think of postal addresses. Country, city, street and house number always come in the same order, so any postman can deliver a letter he has never seen before. A topic name is an address for data. If every team writes addresses in its own order, letters get lost.

i
A convention is a product

Treat your naming convention as a small product with owners, documentation, examples and a way to ask for exceptions. A rule that nobody can find is a rule nobody follows.

2Why Topic Names Matter So Much

A topic name is used everywhere: in code, in security rules, in dashboards, in alerts and in conversations between people.

Three facts make topic names special. First, a topic cannot be renamed. To change a name you must create a new topic, copy the data, and move every producer and consumer. Second, the name is copied into many other places: application configuration, access control rules, monitoring queries, schema subjects, connector settings and documents. Third, names are read by humans in an emergency at three in the morning, when clarity matters most.

0
ways to rename a topic in place
249
maximum characters Kafka allows in a topic name
Many
places a single name gets copied into

What good names give you

Discovery

Find data fast

Engineers can list topics for one domain or one team and understand them without asking around.

Ownership

Know who to call

A name or a linked catalog entry shows which team owns the topic and who to page when it breaks.

Security

Write simple access rules

Rules that match a prefix let you grant a team access to all its topics with a single line.

Operations

Automate

Scripts and dashboards can group topics by pattern, set default settings, and alert the right people.

Evolution

Change safely

Versions in names allow breaking changes without breaking every reader at once.

Cost

Spot waste

Clear names show forgotten test topics and duplicates that consume disk and money.

Everyday analogy

Think of naming the pipes in a big building. Pipes labeled “cold water, floor 3, kitchen” can be fixed by any plumber. Pipes labeled “pipe 1”, “pipe 2” need the original builder, who may have left the company years ago.

3The Anatomy of a Topic Name

A good name is built from a few small parts placed in a fixed order, like beads on a string.

Most conventions choose from the same set of parts. Not every organization needs all of them. The art is picking the smallest set that answers the questions people really ask.

flowchart LR
  A["Environment"] --> B["Domain or business area"]
  B --> C["Subdomain or service"]
  C --> D["Data type"]
  D --> E["Entity name"]
  E --> F["Version"]
Figure 1: The common building blocks of a topic name, in a typical order from broad to specific.

Read the figure from left to right. The name starts broad and becomes more specific, just like an address that moves from country to house number. Each part answers one question.

PartQuestion it answersExample
EnvironmentWhich stage is this: production, staging or test?prod
DomainWhich business area owns the data?sales
Subdomain or serviceWhich part of the area or which application?checkout
Data typeIs it an event, a command, a snapshot or an internal topic?event
EntityWhat thing is the data about?order-paid
VersionWhich edition of the data shape?v1

Putting these together might give prod.sales.checkout.event.order-paid.v1. That is long but complete. Many teams shorten it by dropping parts that are already known. A cluster that serves only production does not need an environment part. A small company with one domain does not need a domain part.

!
More parts, more typing

Every extra part makes names longer and harder to read aloud. Add a part only when it is needed to tell topics apart or to write a useful security or monitoring rule.

4What Kafka Itself Allows

Before designing rules, know the limits of the platform. Your convention must live inside them.

RuleDetail
Allowed charactersLetters, digits, dot, underscore and hyphen
Maximum length249 characters
Reserved namesA single dot and a double dot are not allowed as names
CaseNames are case sensitive, so Orders and orders are different topics
Spaces and special charactersNot allowed
Internal topicsKafka uses names starting with a double underscore for its own topics

The dot and underscore collision

Kafka turns topic names into metric names for monitoring. In that process, a dot and an underscore can look the same. A topic called orders.paid and another called orders_paid may produce clashing metric names, and Kafka refuses to create a topic whose name collides this way with an existing one. This is a technical reason to pick one separator style and stay with it, rather than mixing dots and underscores in the same cluster.

Case sensitivity

Because names are case sensitive, “Orders” and “orders” can exist together, which invites confusion. Choose lowercase for everything. Lowercase names are easier to type, easier to match with patterns, and safe on systems where file names ignore case, since topics are stored as folders on disk.

Everyday analogy

Think of speaking on a phone line with a bad connection. Names that differ only by a capital letter or by a dot versus a dash are like two people called Jon and John. Somebody will call the wrong one.

i
Limits change slowly, but check

The rules above are long-standing. Confirm them against the documentation of the Kafka version you run, especially for managed cloud services that may set stricter limits of their own.

5Choosing Separators, Case and Style

Small style choices, made once, prevent thousands of small arguments later.

A separator is the character that splits the parts of a name. The three legal choices are the dot, the hyphen and the underscore. Each has strengths.

SeparatorStrengthsWeaknesses
DotReads like a hierarchy; common in the Kafka community; easy to split into partsCollides with underscore in metrics if both are used; some tools treat dots as special
HyphenVery readable inside words such as order-paid; no metric collision with dotsCan look like a minus sign in some tools; less obviously hierarchical
UnderscoreFamiliar to database people; works well as a word joinerCollides with dots in metrics; harder to see in underlined links

A popular combination

Many teams use dots between levels and hyphens inside a level. So sales.checkout.order-paid.v1 has three levels split by dots and a compound word joined by a hyphen. This gives you a clear hierarchy and readable words, and it avoids mixing dots with underscores.

Other style rules worth writing down

Case

All lowercase

No capitals anywhere. It removes a whole class of typing mistakes.

Words

Full words, few abbreviations

Use “customer”, not “cst”. If you allow abbreviations, keep an approved list.

Number

Singular or plural, pick one

Say “order-paid” or “orders-paid”, but never both. Singular is common because each message is one fact.

Tense

Past tense for events

Events describe facts that already happened, so “order-placed” is better than “order-place”.

Language

One human language

Keep all names in one language, usually English, so search works.

Content

No secrets, no people

Never put personal data, passwords or individual names into a topic name.

!
Do not encode a technology

Names such as “mysql-orders-topic” tie the name to a tool that may be replaced next year. Name the business meaning, not the machinery. The word “topic” inside a topic name adds nothing.

6Common Convention Styles Compared

There is no single correct convention. Here are the main families, with their good and bad sides.

StyleExampleGood forWatch out for
Domain firstsales.checkout.order-paid.v1Organizations with clear business areas and ownershipDomains that change when the company reorganizes
Team firstteam-payments.invoice-createdSmall companies where teams own everythingTeam names change; data outlives teams
Data type firstevent.order.paidPlatforms that treat events, commands and state differentlyHard to grant access by business area
Environment firstprod.sales.order-paidShared clusters holding several stagesLong names; better to use separate clusters
Flat namesorder-paidVery small systems and prototypesCollisions and confusion as the system grows
Source basedmysql.shop.ordersRaw change data capture topicsLeaks technical details to consumers

Which family should you choose?

For most growing organizations, domain first works best. Business domains such as sales, billing, shipping and identity are more stable than team names or technologies. Data outlives the team that first wrote it. A domain-based name still makes sense after three reorganizations.

Everyday analogy

Think of a supermarket. Goods are arranged by kind: dairy, bakery, drinks. They are not arranged by which delivery driver brought them. Drivers change every month; the need for milk stays. Domain-first names are the supermarket layout.

i
Stability is the test

For every part of a name ask: “Will this still be true in five years?” Environment names, team names and tool names usually fail this test. Business domain names usually pass.

7Naming by Business Domain

Domain-based naming ties each topic to a part of the business, so ownership and meaning are obvious.

A domain is an area of the business with its own language, rules and people, such as payments, inventory or customer identity. The idea comes from a design approach that splits a large system into domains, each owned by one team. The team is responsible for the data it publishes, just as a department is responsible for its reports.

Choosing domain names

1

List the business areas

Use words the business uses in meetings, such as sales, billing, logistics and support, not names of software products.

2

Give each area one owner

Every domain has an owning team that approves new topics and answers questions.

3

Keep the list short

A dozen well-chosen domains beat sixty overlapping ones. Overlap causes debates about where a topic belongs.

4

Publish the list

Store the approved domains where everyone can read them, and add new ones through a light review.

Subdomains and services

Inside a domain, a second level often names a subdomain or a service, for example sales.checkout and sales.catalog. Be careful with service names: services are split and merged over time. Where possible, name the subdomain by business function, not by the current application that happens to implement it.

Everyday analogy

A hospital labels its wings by function: emergency, maternity, radiology. It does not label them by the contractor who built each wing. When a new contractor extends the building, the labels stay valid.

!
Avoid the “shared” and “common” trap

A domain named “common”, “shared” or “misc” quickly becomes a dumping ground. If a topic does not fit any domain, that is a signal to discuss ownership, not to invent a vague home.

8Naming by Kind of Data: Events, Commands and State

Not all messages are alike. A good name tells readers what kind of message a topic holds.

Three kinds of data appear again and again in Kafka systems, and mixing them causes confusion.

Event

Something happened

A fact in the past, such as “order paid”. Events are never denied later; a correction is a new event. Names use past tense.

Command

Please do this

A request for action, such as “send this email”. A command may be refused. Names use an action phrase.

State

This is how things are now

The latest version of a thing, such as a customer profile. Often kept with compaction so only the newest value per key remains.

Ways to show the kind in the name

ApproachExampleComment
Type as a name partsales.event.order-paid.v1Explicit and easy to filter, but longer
Type by word formsales.order-paid.v1Past tense signals an event; short, but subtle
Type as a suffixsales.customer.state.v1Groups all versions of one entity together
Separate clusters or prefixes for commandscmd.sales.send-invoiceMakes access rules and retention settings simple

The reason to show the kind is that each kind is treated differently. Events are usually kept for a time period, commands are short-lived, and state is often compacted. Setting the right default for each kind is easier when the name reveals the kind.

Everyday analogy

Think of a mailbox at home. Newspapers report what happened, letters ask you to do something, and your address label tells where you live now. You would not want them all mixed in one pile without any marking.

i
Name events as facts

Prefer “order-shipped” over “ship-order” for event topics. A fact-style name stops people from treating the topic as a to-do list, which would tie producers to what consumers do.

9Public and Private Topics

Some topics are promises to the whole company. Others are private details of one application. Names should show which is which.

A public topic, sometimes called a shared or contract topic, is meant to be read by other teams. Its format is a promise: the owner will keep it stable, document it and version it carefully. A private topic is used only inside one application or team. Its format can change freely because no outsider depends on it.

flowchart LR
  A["Service A private topics"] --> B["Service A logic"]
  B --> C["Public topic: sales.order-paid.v1"]
  C --> D["Team B consumer"]
  C --> E["Team C consumer"]
  F["Team B private topics"] --> D
Figure 2: Private topics stay inside a team. Only public topics cross team boundaries.

The figure shows that service A keeps its own working topics private, and publishes only one clean public topic that teams B and C read. If service A changes its internal design, only its private topics change, and the public promise stays.

Marking visibility in names

MethodExampleEffect
Prefix for publicpublic.sales.order-paid.v1Clear, and access rules can allow all readers
Prefix for privateprivate.checkout.cart-work.v1Rules can deny outside readers by default
Team or service segment for privatecheckout-svc.internal.cart-workOwner is obvious; only that team gets access
!
The accidental contract

When another team reads a private topic, it becomes an unplanned contract. The owner cannot change it without breaking a stranger. Visibility marks plus access rules help stop this early.

10Internal, Retry and Dead Letter Topics

Besides business topics, many helper topics appear. They also need clear names.

Kafka internal

Created by Kafka

Kafka creates topics for its own work, for example one that stores consumer progress. Their names start with a double underscore. Never create your own topics with that style, and never delete these.

Streams internal

Created by Kafka Streams

Stream processing applications create repartition and changelog topics. Their names are built from the application id, so the application id is part of your naming design.

Connect internal

Created by Connect

Kafka Connect stores its configuration, offsets and status in topics whose names you choose. Give them a clear, cluster-specific name.

Retry

Second chances

Failed messages may be sent to a retry topic to be processed again after a delay. The name should show the original topic and the retry stage.

Dead letter

Messages that cannot be handled

Messages that keep failing go to a dead letter topic for people to inspect. The name should point to the source topic and the consumer that failed.

Schemas

Schema storage

A schema registry keeps its data in a topic, often with an underscore-prefixed default name. Treat it as infrastructure.

A pattern for retry and dead letter names

A common approach is to add a suffix to the source topic name and to include the consumer group, because two different consumers of one topic may fail on different messages. For example, a topic sales.order-paid.v1 read by the group billing-invoicer could have sales.order-paid.v1.billing-invoicer.retry-1 and sales.order-paid.v1.billing-invoicer.dlt. The suffix approach keeps related topics sorted together in listings and lets access rules treat them as a family.

Everyday analogy

Think of a post office. Undeliverable letters go to a special room labeled with the route they came from, so staff can work out what went wrong. A room labeled just “problems” would be useless after the first week.

i
Helper topics deserve owners

Retry and dead letter topics fill up silently. Name them so that alerts can find them by pattern, and assign the consuming team as owner.

11Versioning in Topic Names

Data shapes change. A version marker lets you introduce a breaking change without breaking every reader on the same day.

A version in a name, such as v1 or v2, marks a major edition of the message format. It is not needed for every small change. Kafka teams usually keep a schema registry that checks compatibility of changes. Adding an optional field, for example, can happen without a new topic. But some changes are breaking: removing a field, changing a meaning, or changing a type in a way old readers cannot understand. For breaking changes, a new topic name gives everyone a clean path.

flowchart TD
  A["Producer writes v1 topic"] --> B["Breaking change needed"]
  B --> C["Create v2 topic"]
  C --> D["Producer writes both v1 and v2"]
  D --> E["Consumers migrate one by one"]
  E --> F["All consumers on v2"]
  F --> G["Stop writing v1 and retire it after retention"]
Figure 3: A safe migration from a version one topic to a version two topic.

The figure shows the dual-write period. The producer writes the same fact in both formats for a while. Each consuming team switches when ready. When nobody reads v1 any more, the producer stops writing it, and the old topic expires under its retention rules and is then deleted.

Where to put the version

PlacementExampleComment
Last partsales.order-paid.v2Most common; all versions of an entity sort together
Middlesales.v2.order-paidGroups all v2 topics of a domain; less common
Not in the namesales.order-paidSimple; depends on schema compatibility rules to protect readers

Use major versions only

A name should carry only the major version, like v1 and v2, never v1.2.3. Minor changes should be compatible and therefore need no new topic. If names carry minor versions, every small change forces every consumer to switch, which defeats the purpose.

Everyday analogy

Think of a phone charger port. Small improvements inside the phone do not change the port. When the port shape changes completely, a new generation of cables is needed, and the old and new cables live together for a while. The name of the port generation is the version.

!
Versions cost storage

Every extra version is a full copy of the data. Set an end date for old versions and follow it, or you pay twice for years.

12Environments and Multiple Clusters

Should the environment, such as production or test, be part of the topic name? It depends on how you run your clusters.

An environment is a stage of software life: development, testing, staging, production. A cluster is a group of brokers working together. There are two main designs.

DesignEnvironment in name?AdvantagesDrawbacks
Separate cluster per environmentNoSame topic names everywhere; code moves between stages unchanged; strong isolationMore clusters to run and pay for
Shared cluster for several environmentsYes, as a prefixCheaper for small teamsRisk of mixing data; names must be changed per environment; noisy neighbors

Separate clusters are the cleaner design. The application uses the same topic name in test and production, and only the connection address differs. This means the name is a stable business identity, not a deployment detail. It also reduces mistakes where a test program accidentally writes to a production topic.

If you must share a cluster

Use a short prefix such as dev, stg and prd, and make the prefix come from configuration, not from code. Add access rules so that test identities cannot touch production prefixes. Be strict about it, because a shared cluster removes the safety wall that separate clusters give.

Cluster and region names

When data is copied between clusters, for example for disaster recovery or for sharing across regions, replication tools often add the source cluster name to the topic name, such as us-east.sales.order-paid.v1. Plan for this. Your convention should not fight the prefix rules of the replication tool you choose, and you should decide whether consumers read the local copy, the remote copy, or both.

Everyday analogy

Think of a theatre rehearsal stage and the real stage. If both stages are identical and only the audience differs, actors need no extra directions. If both share one stage with tape marks on the floor, somebody will eventually walk onto the wrong mark during a live show.

i
Keep names environment-free where possible

If the same application runs in three environments, its code and its documentation stay simple when topic names are identical in all three.

13Access Control and Prefix Rules

Names and security work together. A good hierarchy lets one short rule cover many topics.

Kafka uses access control lists, called ACLs, to decide who may read from or write to a topic. An ACL rule can name one exact topic, or it can use a prefix, which matches every topic whose name begins with a given text. With prefix rules, “team billing may write to every topic starting with billing.” is one line. Without a good naming design, the same policy needs hundreds of lines that must be updated with each new topic.

GoalRule ideaNaming requirement
Owner may write to its own domainAllow write on prefix “sales.”Domain is the first name part
Everyone may read public topicsAllow read on prefix “public.”Visibility marker at the start
Only owner reads private topicsAllow read on the private prefix of one serviceService name in private topic names
Test identities blocked from productionDeny on production prefixEnvironment prefix on shared clusters
Sensitive data restrictedAllow read only to named groups on a restricted prefixClassification marker in the name or a dedicated prefix

The first part of the name is the most valuable

Prefix rules can only look at the beginning of the name. Therefore, the part you most need to secure by, usually the domain or a visibility marker, must come first. Put a part at the end and it can be used for reading but not for prefix-based access rules.

Everyday analogy

Think of a building with keys for whole floors. If rooms are numbered by floor first, a key for “floor 3” is easy. If numbers were random, each room would need its own key and a long list to track.

!
Do not rely on the name alone

A name that says “public” does not make a topic safe. Only real access rules protect data. Names help you write and review those rules, but they never replace them.

14Data Classification and Privacy in Names

Some topics carry personal or secret data. The name can signal how carefully to treat them, but it must never leak the data itself.

Data classification is a label that says how sensitive data is, for example public, internal, confidential and restricted. Companies use classification to decide encryption, retention, who may read it and how it may be copied.

Do

Signal the level

Use a marker or a dedicated prefix so tools and people know that a topic holds confidential data.

Do

Keep it in a catalog too

Names are short; a catalog or tags can hold richer labels such as data owner and legal basis.

Do not

Put personal data in names

No customer names, emails, phone numbers or identifiers. Topic names appear in logs and dashboards that many people can see.

Do not

Create a topic per person

A topic per customer does not scale and puts personal identifiers into names. Use one topic and message keys instead.

Why a topic per customer is a trap

Each topic has partitions, and each partition has files and memory costs on the brokers. Tens of thousands of tiny topics slow down cluster management. Naming problems come with it: customer identifiers land in names, logs and metrics. The better design is a single topic keyed by customer identifier, with access to the data controlled through application logic and encryption where needed.

Everyday analogy

Think of a hospital ward door. The door sign says “Restricted, staff only”. It does not list patient names. The sign warns you, and the lock does the protecting.

i
Privacy laws and retention

Rules such as data deletion requests are easier to meet when topics that hold personal data are easy to find. A consistent marker helps auditors and engineers locate them.

15Ownership and Metadata Beyond the Name

A name is short. Much of what people need to know belongs in metadata attached to the topic.

Names should carry only what is stable and needed for rules. Everything else, such as owner, contact channel, description, retention reasons, data classification and links to documents, should live in a topic catalog. A catalog is a searchable list of topics with details. It can be a dedicated tool, a shared repository of configuration files, or a simple registry.

InformationIn the name?In the catalog?
Business domainYesYes
Entity or eventYesYes, with a description
Major versionYesYes
Owner team and contactNo, teams changeYes
Retention and reasonNoYes
Schema linkNoYes
Data classificationSometimes a markerYes
Service level, such as criticalityNoYes
List of consumersNoYes

Topics as code

Many teams keep topic definitions in a repository as configuration files. A definition lists the name, partitions, replication, retention and metadata. Changes go through review, and a tool applies them to the cluster. The repository then becomes the catalog and the audit trail. Naming rules can be checked automatically during review.

Everyday analogy

A book on a shelf has a short spine label, but its full record in the library system holds the author, the year, the owner and the borrowing history. The spine label lets you find it, and the record tells you everything else.

i
Do not overload the name

If you find yourself adding a part just to record who owns the topic, use metadata instead. Owners change; names cannot.

16Length, Readability and Search

Names are read by people and typed into tools. Keep them long enough to be clear and short enough to be usable.

Kafka allows 249 characters, but that is a ceiling, not a target. Long names are hard to fit into dashboards, hard to say in meetings, and easy to mistype. A practical target is under about fifty characters, with each part a short word or two.

Readability testQuestion
Say it aloudCan a colleague understand it when you read it over the phone?
Guess the contentCould a new engineer guess what the topic holds without documentation?
Guess the ownerIs the owning area obvious from the first part?
AutocompleteWhen you type the first part, do you get a helpful list?
Sort orderDo related topics sit next to each other in an alphabetical list?

Sorting is a design tool

Lists of topics are usually sorted alphabetically. Because of this, the order of parts decides how things are grouped. With the domain first, all sales topics sit together. With the entity first, all order topics from different domains sit together, and ownership is scattered. Pick the order that matches how people browse.

Matching by pattern

Consumers can subscribe to topics by a pattern, and tools can select topics by pattern. Well-structured names make patterns simple. A pattern that means “every version one event topic in sales” is easy if parts are regular. It is impossible if names follow no shape.

!
Careful with wildcard subscriptions

A consumer that subscribes to a wide pattern will silently start reading any new topic that matches. That is convenient for logging tools and dangerous for business processors. Keep patterns narrow.

17Naming the Things Around Topics

Topics are not alone. Consumer groups, connectors, schemas and applications should follow related rules.

ThingNaming ideaExample
Consumer groupOwning service and purpose; one group per logical consumerbilling-invoicer
Client identifierService name and instance role, for quotas and logsbilling-invoicer-producer
ConnectorDirection, system and entitysource-orders-database
Streams application identifierService and purpose; it becomes the prefix of internal topicsbilling-order-totals
Transactional identifierService plus stable instance numberbilling-writer-3
Schema subjectFollows the topic name by default strategysales.order-paid.v1-value

Schema subjects and topic names

A schema registry stores the message formats. Each format is saved under a subject. The default strategy builds the subject from the topic name plus “-key” or “-value”. That means topic names flow into schema subject names, so a clean topic name gives clean subjects. Other strategies use the record type name instead, which allows several kinds of events in one topic. Decide the strategy at the same time as the topic convention, since they affect each other.

Consumer groups tell the story of who reads what

When something is slow, people look at consumer groups. A group name such as “app1” says nothing. A name like “billing-invoicer” tells the reader who is behind the reading. Aligning group names with service names, and with the same domain words used in topics, makes incident work far quicker.

Everyday analogy

Think of naming rooms, keys and visitors in an office. If rooms are called “Finance Room 2” and keys are labeled “Finance Room 2 key”, nothing gets lost. If keys were labeled by colors nobody remembers, the locksmith gets rich.

i
One vocabulary

Use the same domain words across topics, groups, connectors and dashboards. A shared vocabulary is the cheapest documentation there is.

18Governance: Who Creates Topics and How

A convention only works if topics are created through a controlled path. Otherwise the rules are suggestions.

Turn off automatic topic creation

Kafka can be set to create a topic automatically the first time a program writes to or reads from a name. This feature is handy in demos and harmful in production, because a single typo creates a real topic with default settings. Set the broker option for automatic creation to false in production clusters, so topics come into being only on purpose.

Choose a creation model

ModelHow it worksGood forRisk
Central platform teamA team creates topics on requestSmall organizations, strict controlBottleneck and slow delivery
Self service with checksTeams submit topic definitions; automation validates names and settingsGrowing organizationsNeeds tooling investment
Free for allAnyone creates anythingPersonal sandboxes onlySprawl, clashes and cost

What the checks should verify

1

Shape

Name matches the pattern: allowed characters, lowercase, correct number of parts, separators in the right places.

2

Vocabulary

The domain is on the approved list and the requesting team owns it.

3

Settings

Partitions, replication and retention fall within allowed ranges for that kind of topic.

4

Metadata

Owner, description and data classification are filled in.

5

Uniqueness

No near-duplicate exists, such as a name differing only by a dot or underscore.

!
Speed matters

If the approved path takes a week, people will find a way around it. Make the compliant path the fastest one.

19Enforcing the Convention with Automation

Rules that only exist in a document are forgotten. Rules that exist in a tool are followed.

flowchart TD
  A["Team writes topic definition"] --> B["Pull request opened"]
  B --> C["Automated name and settings check"]
  C -->|"Fails"| D["Feedback to the team"]
  D --> A
  C -->|"Passes"| E["Owner and platform review"]
  E --> F["Merge"]
  F --> G["Tool creates topic on the cluster"]
  G --> H["Catalog and access rules updated"]
Figure 4: A topics-as-code flow where every new topic passes an automatic name check before it exists.

In the figure, a team writes the definition as a file and opens a request for review. A robot checks the name and settings at once and returns errors in seconds. Humans review only the meaning. After the merge, a tool creates the topic and updates the catalog and access rules, so the cluster, the documents and the security stay in step.

Layers of enforcement

Layer 1

Review-time checks

A validation script or policy in the repository rejects bad names before they reach any cluster.

Layer 2

Broker-side policy

Kafka brokers accept a plug-in policy that can reject topic creation requests that break your rules, whatever tool made the request.

Layer 3

Access rules

Only the automation identity may create topics. People and applications have no permission to create them directly.

Layer 4

Scanning

A scheduled job lists all topics, flags names that do not match, and reports them to owners.

i
Start with scanning

If you already have a messy cluster, begin by scanning and reporting. It shows the size of the problem without breaking anything, and it builds the case for stricter layers.

20Worked Example: An Online Store

Let us design a convention for a fictional online store step by step.

The store has several teams: catalog, checkout, payments, shipping and customer identity. It runs one production cluster and one test cluster. Data is shared between teams and there are a few sensitive topics that hold personal data.

Decisions

QuestionDecisionReason
Separator and caseDots between levels, hyphens inside words, all lowercaseReadable hierarchy without metric collisions
Environment in the name?No; separate clustersIdentical names in every environment
Order of partsdomain, subdomain, kind and entity, versionDomain first for access rules and sorting
Kind of dataSuffix inside the entity part, such as order-paid for events and customer-state for stateShort names; past tense shows events
VersionMajor only, last partAll versions sort together
VisibilityPublic topics use the plain pattern; private topics start with the service name and the word internalSimple prefix rules
Sensitive dataA confidential marker inside the domain part for topics with personal dataEasy to find and to restrict

Resulting names

Topic nameWhat it means
catalog.product.product-published.v1Event: a product became visible in the store
checkout.cart.order-placed.v1Event: a customer placed an order
payments.charge.payment-captured.v1Event: money for an order was taken
shipping.parcel.parcel-dispatched.v1Event: a parcel left the warehouse
identity.customer.customer-state.v2State: latest customer profile, second format edition, compacted
checkout-svc.internal.cart-work.v1Private working topic of the checkout service
checkout.cart.order-placed.v1.billing-invoicer.dltDead letter topic of one consumer of the order event

Notice how much a stranger can learn. The first word gives the owning area, the middle gives the object, the entity name says event or state, and the end gives the edition. Access rules also become short: the payments team may write to everything starting with “payments.”, and everyone may read public event topics through a small, reviewed list.

Everyday analogy

Think of a street map where every street is named on a pattern: district, avenue, house number. A visitor who has never been to the town can find any house. That is what the store’s topic names do for data.

21Cleaning Up an Existing Messy Cluster

Most teams do not start from a blank page. They inherit hundreds of topics with names nobody dares to touch. Here is a safe way forward.

Because a topic cannot be renamed, “fixing” a name means creating a new topic and moving traffic. That is real work with real risk, so it must be chosen carefully. Not every bad name deserves a migration. A useful rule is to migrate only when a bad name causes ongoing pain, such as security gaps, confusion in incidents, or blocked automation.

flowchart TD
  A["Scan all topics"] --> B["Classify: good, tolerable, harmful"]
  B --> C["Freeze new bad names"]
  C --> D["Pick harmful topics by value and risk"]
  D --> E["Create new named topic"]
  E --> F["Copy old data and dual write"]
  F --> G["Move consumers one by one"]
  G --> H["Retire old topic after safe period"]
Figure 5: A staged clean-up. Stop the bleeding first, then migrate only what is worth migrating.

Steps in plain words

1

Take inventory

List every topic, its size, its producers and its consumers. Consumer group listings and access logs help find who uses what.

2

Sort into three piles

Good enough, tolerable with an exception, and harmful. Be generous with the first two piles, since every migration costs effort.

3

Freeze the mess

Turn on the checks for all new topics immediately, so the pile stops growing while you clean.

4

Delete the dead

Many old topics have no consumers and no recent messages. Confirm with owners and delete them. This is the cheapest clean-up of all.

5

Migrate the harmful

Create the new topic, copy data with a replication or copy tool, have the producer write to both, and move consumers one at a time.

6

Retire the old topic

Stop writing to it, wait a full retention period, confirm no readers, then delete it.

Aliases through documentation

Kafka has no built-in alias feature. For topics you cannot migrate, record the “good name” in the catalog next to the real one, so people can search by the name they expect. Documentation is a weak substitute for a proper name, but it costs almost nothing.

Everyday analogy

Think of renaming streets in a city. You do not rename them all overnight. You put new signs on the worst confusing streets, keep a table that maps old names to new ones, and make sure every new street follows the new pattern from now on.

!
Copying is not free

Copying a large topic uses network, disk and broker time. Schedule it away from peak hours and watch cluster metrics. Also check that message ordering and consumer positions are handled explicitly, since offsets in the new topic differ from the old.

22Topic Classes and Their Default Settings

When names reveal the kind of topic, you can apply the right settings by default.

Different kinds of topics want different settings. Retention decides how long messages stay. Compaction keeps only the newest message per key. Replication decides how many copies exist. Partitions decide how much parallel work is possible. If the name shows the class, templates can apply sensible defaults and reviewers can spot odd choices.

ClassHow the name shows itTypical retentionCompactionNotes
Business eventPast-tense entity nameDays to weeks, or longer if replay is neededNoReplication of three is common for important data
State or tableEntity name ending in stateKept indefinitely through compactionYesMessages need a stable key
CommandAction phraseShort, hours to daysNoConsumers must handle duplicates
RetrySuffix retry with stage numberShortNoLow volume
Dead letterSuffix dltLonger, to give people time to investigateNoAlert on any growth
Log or metrics streamDomain such as logs or telemetryShort, hours to daysNoHigh volume; may use cheaper settings
Private working topicService and internal markersShort to mediumDependsOwner decides

The numbers above are typical starting points, not rules. Your legal, business and cost needs decide the real values. The table simply shows how a naming class can lead to a settings template, so that the person creating a topic answers one question, “which class is this?”, and inherits a tested set of defaults.

Everyday analogy

Think of a warehouse with zones: frozen goods, chilled goods, dry goods. The label on the door tells staff which temperature to set. Nobody measures the temperature for every box; they trust the zone.

i
Templates beat memory

A template keyed by class prevents forgotten settings, such as a state topic created without compaction, which is a common and costly mistake.

23Monitoring and Dashboards That Use Names

Every metric, log line and alert mentions a topic name. Good names make monitoring smarter.

Monitoring systems group and filter by text. With regular names, you can build one dashboard per domain, one alert per class, and one report per team without listing topics by hand. New topics appear in the right dashboards automatically because they match the pattern.

NeedPattern ideaResult
Domain dashboardNames starting with the domainOne board for all sales topics, without maintenance
Dead letter alertNames ending in dltOne alert rule covers all present and future dead letter topics
Retry growthNames containing retryEarly sign of a failing consumer
Version trackingNames by entity across versionsSee how much data still flows in old versions
Cost reportGroup storage by domainCharge or show costs back to each owner
Unowned topicsNames outside approved domainsFind stray topics to clean up

What to watch per topic

Volume

Bytes and messages in and out

Shows growth, sudden drops and traffic spikes.

Lag

Consumer lag

Shows how far readers are behind. Group by consumer group name and topic.

Size

Disk used

Reveals forgotten topics and retention mistakes.

Health

Under-replicated partitions

Shows topics whose copies are not all in sync.

Errors

Failed produce and fetch

Shows authorization mistakes and size limit problems.

Age

Time since last message

Reveals abandoned topics and stalled producers.

!
Label cardinality

Monitoring tools slow down when there are too many distinct label values. Thousands of topics multiplied by many metrics can be heavy. Consistent grouping by domain keeps summaries useful even at large scale.

24Multi-Tenancy, Quotas and Cost Attribution

When many teams share a cluster, names help share it fairly.

Multi-tenancy means several teams, called tenants, use one cluster. To keep them from harming each other, operators use quotas, which limit how much traffic a client may send or receive, and access rules. Quotas are attached to client identities and users, not to topic names, yet naming discipline supports them: a client identifier that matches the owning service and a domain prefix that matches the owning team make it easy to see who is heavy and who to talk to.

Tenant prefixes

In some organizations every team gets a prefix, and all topics of that team begin with it. The team can then be given permission to create, alter and delete topics under its prefix and nowhere else. This delegates safe self-service: the team moves fast inside its own area, and the platform team does not review each name.

ApproachBenefitCaution
Team prefixEasy delegation and cost attributionTeam names change; prefix may outlive the team
Domain prefix with owner in catalogStable names; owner can changeRequires a catalog to stay current
Separate clusters for large tenantsStrongest isolationMore cost and operations

Cost attribution

Storage and traffic cost money. When each topic maps to one domain and each domain to one owner, you can total storage and throughput by domain and show each owner their share. People who see the bill tend to fix forgotten topics and oversized retention very quickly.

Everyday analogy

Think of an apartment block with a shared electricity supply. Each flat has its own meter labeled with the flat number. Without labeled meters, the bill is divided by guesswork and nobody saves energy.

i
Name the client too

Ask every application to set a meaningful client identifier. Logs, quotas and metrics will then tell you who is behind a heavy load.

25Topic Count, Performance and Scalability

A convention influences how many topics you create, and topic count has a real cost.

Each topic has one or more partitions, and each partition is stored as files on brokers and tracked in cluster metadata. Very large numbers of partitions increase memory use, recovery time after failures, and the load on the cluster’s control system. Modern Kafka versions handle far more partitions than older ones, but the cost is still real, and limits differ between self-managed and cloud services.

How naming design affects the count

Fewer topics

One topic per event family

Related events can share a topic when ordering across them matters. The convention should allow this and say how to name such topics.

More topics

One topic per event type

Simple and clear, but topic count grows with the number of event types.

Avoid

Topic per customer or per device

Leads to enormous counts. Use message keys instead.

Avoid

Topic per day or per hour

Date-stamped topics multiply forever. Use retention to age data out of one topic.

The choice between one topic for many event types and many topics

If events must be read in exact order, such as “order created”, “order paid”, “order shipped” for one order, putting them in one topic keyed by order identifier preserves order. If events are independent, separate topics are simpler for consumers, who then only read what they need. Your convention should name the “family” topic by the entity, for example sales.order.v1, and the separate-event topics by event, for example sales.order-paid.v1. Pick one style per domain, and record why.

Everyday analogy

Think of a filing cabinet. One drawer per customer means thousands of drawers and a cabinet that fills the room. One drawer per kind of paper, with a folder tab per customer, is compact. Keys and folder tabs do the same job for messages.

!
Date in a topic name

A topic such as “orders-2026-09-29” looks tidy at first. After a year there are hundreds of them, consumers must be reconfigured daily, and permissions must be updated. Retention already does this job.

26Advantages, Disadvantages and Trade-offs

A strict convention brings order, and it also brings costs. Weigh both honestly.

Advantages of a strong convention

  • Data is easy to find and understand.
  • Access rules are short and reviewable.
  • Monitoring and alerting can be automatic.
  • Ownership and cost are clear.
  • Versions allow safe change.
  • New engineers become productive sooner.
  • Audits and privacy work become easier.

Disadvantages and risks

  • Time and effort to design, document and enforce.
  • Rigid rules can feel slow to teams in a hurry.
  • A bad early choice is expensive to undo.
  • Long names are harder to read.
  • Rules may not fit unusual cases.
  • Needs upkeep as the business changes.

Key trade-offs

ChoiceOne sideOther side
StrictnessStrict checks give consistencyLoose rules give speed and freedom
Detail in namesRich names are self-explainingShort names are readable and stable
Versions in namesSafe breaking changesExtra copies and migration work
Environment in namesCheap shared clustersSeparate clusters keep names identical and safe
Central controlUniform qualityDistributed ownership is faster
Everyday analogy

Traffic rules slow each driver a little, but they let thousands of cars share the road safely. A few drivers will grumble at the red light, yet everyone gets home.

27Failure Scenarios and Troubleshooting

Naming mistakes show up as strange incidents. Here is how to recognize them.

SymptomLikely naming causeWhat to do
Topic creation refused, name “collides” with anotherDot and underscore versions of the same nameChoose one separator style and use the existing topic
Unexpected topic appears with default settingsTypo plus automatic creation switched onDisable automatic creation; delete the stray topic; fix the client
Consumer reads messages it should notWildcard subscription matches a new topicNarrow the pattern; tighten access rules
Access denied for a new topicName outside the team’s prefixRename in the definition or request the right prefix
Two teams write to what they think are different topicsAmbiguous generic name, such as eventsIntroduce domain names; migrate
Schema errors after moving a topicSchema subject is tied to the old topic nameRegister schemas under the new subject before switching
Cannot tell who owns a failing topicNo owner in name or catalogAdd owner metadata; enforce it at creation
Replicated copy has an unexpected nameReplication tool adds a cluster prefixPlan for prefixes; document which copy to read
flowchart TD
  A["Unexpected topic or access problem"] --> B{"Is the name valid and in pattern"}
  B -->|"No"| C["Find creator; fix definition; migrate or delete"]
  B -->|"Yes"| D{"Does an access rule cover the prefix"}
  D -->|"No"| E["Adjust the prefix rule or the name"]
  D -->|"Yes"| F{"Does a schema subject match"}
  F -->|"No"| G["Register schema under the right subject"]
  F -->|"Yes"| H["Check client configuration and client identity"]
Figure 6: A simple checklist for naming-related access and creation problems.
i
Write the incident down

Each naming incident is a lesson for the convention. Add a rule or a check so the same mistake cannot happen twice.

28Design Patterns and Anti-patterns

Patterns that repeatedly work, and mistakes that repeatedly hurt.

Pattern

Domain-first hierarchy

Context: Many teams share a cluster and need clear ownership.

Decision: Start every name with a stable business domain.

Consequence: Short prefix rules, grouped listings, stable names across reorganizations.

Pattern

Topics as code with automatic checks

Context: Topics are created by many people.

Decision: Keep definitions in a repository and validate names on every change.

Consequence: Consistent names, an audit trail and fast feedback.

Pattern

Major version suffix with dual-write migration

Context: A message format must change in a breaking way.

Decision: Create a new versioned topic and migrate readers gradually.

Consequence: No big-bang switch; extra storage for a limited time.

Pattern

Suffix families for helper topics

Context: Retry and dead letter topics multiply.

Decision: Build their names from the source topic plus the consumer and a suffix.

Consequence: Related topics sort together and alerts match by pattern.

Anti-pattern

Vague generic names

Problem: Names like events, data, test2 or new-topic.

Effect: Nobody knows the content or the owner; collisions; permanent clutter.

Better: Always include domain and entity.

Anti-pattern

Encoding the owner or the tool

Problem: Names containing a person, a team nickname or a technology.

Effect: Names go stale when people, teams or tools change.

Better: Use business meaning; keep owners in a catalog.

Anti-pattern

Mixed styles

Problem: Some names with dots, some with underscores, some with capitals.

Effect: Metric collisions, failed patterns and confusion.

Better: One style, enforced by tools.

Anti-pattern

Topic per entity instance or per date

Problem: A new topic for each customer, device or day.

Effect: Huge topic counts and constant reconfiguration.

Better: Use keys and retention.

29Best Practices and Common Mistakes

A short list to take away and check against your own cluster.

Best practices

  • Write the convention down with examples and a reason for each rule.
  • Use lowercase, one separator style, and full words.
  • Put the most important part for security and grouping first.
  • Name business meaning, not tools, teams or people.
  • Use past tense for events and stable keys for state.
  • Version by major number only, and plan the retirement of old versions.
  • Prefer separate clusters over environment prefixes.
  • Disable automatic topic creation in production.
  • Check names automatically at review time and at the broker.
  • Keep owner, description and classification in a catalog.
  • Scan regularly for stray, empty and unused topics.
  • Review the convention once a year.

Common mistakes

  • Starting without any convention because “we are small”.
  • Copying a convention from another company without thinking.
  • Making names too long or too clever.
  • Mixing dots and underscores.
  • Putting personal data in names.
  • Letting clients create topics on the fly.
  • Ignoring internal, retry and dead letter topics in the design.
  • Keeping old versions forever.
  • Relying on names instead of real access rules.
  • Writing rules nobody can enforce.
i
Good enough and used beats perfect and ignored

A simple convention that every team follows is worth more than an elegant one that only its author understands. Start small, and grow it with real needs.

30Real-World Examples

These are illustrations of common situations, not reports about specific companies.

The startup that grew too fast

A small team named topics as they wished: “orders”, “orders2”, “payments-new”. After two years and forty engineers, nobody knew which was current. They adopted a domain-first convention, blocked new bad names, deleted dead topics, and migrated only the ten most confusing ones. Incident time fell noticeably because names finally told people where to look.

The bank with strict security

A financial organization needed to prove who could read customer data. Topics with personal data got a restricted prefix, and access rules were written on that prefix only. Auditors could read the rules in minutes, and new topics under the prefix were protected automatically.

The retailer with many stores

A retailer first created a topic per store. With hundreds of stores the cluster struggled. They moved to a single topic per event type keyed by store identifier. Names became short, topic count dropped, and new stores needed no new topics.

The platform team that offered self service

A platform team let product teams define topics in a repository. A validator checked names, domains and settings in seconds. Reviews focused on meaning instead of typos. The number of “please create a topic” tickets dropped sharply.

The breaking change done gently

A team had to change a customer message format in a way old readers could not handle. They created a version two topic, wrote to both for six weeks, moved readers one by one, and retired version one afterwards. No consumer was surprised and no outage occurred.

31A Convention Template You Can Adapt

Use this outline as the skeleton of your own written convention.

SectionWhat to write
PurposeWhy the convention exists and who must follow it
PatternThe order of parts, separators, case, allowed characters and maximum length
VocabularyApproved domains, approved abbreviations and the words for kinds of data
Public and privateHow visibility is shown and what each promises
VersionsWhen a new version is required and how migrations run
Helper topicsNaming for retry, dead letter and internal topics
Related namesConsumer groups, clients, connectors, schemas and transactional identifiers
SecurityPrefix rules, classification markers and forbidden content
Creation processWho may create topics and through which tool
MetadataRequired catalog fields such as owner, description and classification
ExceptionsHow to request one and who approves
ReviewHow and when the convention is revisited

Tips for adoption

1

Involve the teams

Ask a few producers and consumers to review the draft. People follow rules they helped shape.

2

Provide examples

A dozen real example names teach faster than a page of rules.

3

Ship the checker with the rules

Give teams a script they can run locally so they know a name is valid before asking anyone.

4

Start with new topics

Apply the rules to new topics first and treat old ones with the clean-up plan.

5

Measure compliance

Track the share of topics that match and celebrate progress.

32Glossary

Plain meanings for the words used in this guide.

TermMeaning
TopicA named stream of messages in Kafka.
PartitionOne ordered slice of a topic.
BrokerA Kafka server that stores messages.
ProducerA program that writes messages.
ConsumerA program that reads messages.
Consumer groupA set of consumers that share the work of reading a topic.
Naming conventionA written rule for how names are built.
DomainA business area with its own language and owner.
EventA record of something that already happened.
CommandA request that something be done.
State topicA topic holding the latest value per key, usually compacted.
CompactionKeeping only the newest message for each key.
RetentionHow long messages are kept.
Dead letter topicA topic for messages that could not be processed.
Retry topicA topic for messages waiting to be tried again.
ACLAn access control rule saying who may do what.
Prefix ruleA rule that matches all names starting with some text.
Schema registryA service that stores message formats.
SubjectThe name under which a schema is stored.
CatalogA searchable list of topics with their details.
Topics as codeKeeping topic definitions in a reviewed repository.
Multi-tenancySeveral teams sharing one cluster.
QuotaA limit on how much a client may use.

33Frequently Asked Questions

Short answers to questions that come up again and again.

Q1 Can I rename a Kafka topic?

Not in place. You create a new topic, copy the data, move producers and consumers, and retire the old topic.

Q2 Should I use dots, hyphens or underscores?

Any of them works if you stay consistent. Dots between levels and hyphens inside words is a popular and safe choice. Avoid mixing dots with underscores because of metric name collisions.

Q3 Should the environment be in the name?

Preferably not. Separate clusters per environment let the same name work everywhere. Use a prefix only on shared clusters, and take it from configuration.

Q4 Do I need a version in every name?

It is helpful for public topics whose format may change in breaking ways. Some teams rely on schema compatibility rules and skip versions until needed. Decide once and be consistent.

Q5 How long can a name be?

Kafka allows up to 249 characters, but aim for well under fifty so names stay readable.

Q6 Can names contain capital letters?

They are allowed and treated as different names from their lowercase forms. Use lowercase only to avoid confusion.

Q7 Where should the owner go?

In a catalog, not in the name. Teams change, but names cannot. The domain part gives a stable hint of the owner.

Q8 Should events and commands share topics?

Usually not. They have different lifetimes and meanings. Keep them apart and let the name show the difference.

Q9 How do schema subjects relate to topic names?

With the default strategy, the subject is the topic name plus a key or value suffix. Choose the strategy with the topic convention.

Q10 Why disable automatic topic creation?

A typo in a client would create a real topic with default settings and no owner. Turning the feature off means every topic is created on purpose.

Q11 How do I enforce the convention?

Combine review-time checks, a broker-side creation policy, restricted permissions so only automation creates topics, and regular scans.

Q12 What about topics that already exist with bad names?

Delete the unused ones, migrate only the harmful ones, and record good names in the catalog for the rest. Stop new bad names at once.

Q13 Is one topic per customer a good idea?

No. It creates huge topic counts and puts identifiers in names. Use one topic with the customer identifier as the message key.

Q14 Should we put the data format, such as JSON or Avro, in the topic name?

Usually not. The format is a technical detail that can change while the business meaning stays the same. Record the format in the schema registry and the catalog instead. A name that mentions a format becomes misleading the day the format changes, and renaming is expensive.

Q15 Who should own the convention itself?

A small group, often the platform team together with representatives from a few product teams, should own it. They approve new domains, answer questions, handle exception requests and keep the written document current. Shared ownership prevents the rules from feeling like orders from a distant department.

Q16 What if a team needs a name that does not fit the pattern?

Provide a simple exception path. The team explains the reason, the owners approve or decline it, and the exception is recorded in the catalog with an expiry date. Exceptions are healthy when they are visible and temporary. They become harmful when they are silent and permanent.

Q17 How often should we revisit the convention?

Once a year, and after any incident caused by naming. Small, careful updates keep it alive without breaking existing topics.

Q18 Do abbreviations belong in topic names?

Only a short, approved list. Abbreviations save characters but cost clarity, especially for newcomers who do not know the local jargon. If two teams use the same abbreviation for different things, confusion follows. Publish the approved list in the convention, and prefer full words whenever the name stays reasonably short.

Q19 How do we test a new convention before rolling it out?

Run the checker against your existing topic list and see how many names would pass. Then try the rules on a handful of upcoming projects and ask the teams if the names felt natural. Adjust the pattern based on what you learn, and only then make the checks mandatory for all new topics.

34Summary and Key Takeaways

A topic name is a small piece of text that carries a large share of a cluster’s clarity, safety and cost.

Kafka permits many names but offers no guidance on choosing them. A good convention fills that gap: it picks one style, orders the parts from broad to specific, shows the kind and visibility of the data, marks versions only when needed, treats internal and helper topics with the same care, and is checked by tools instead of memory. Because names cannot be changed, the early decisions matter most, and the cheapest time to make them is before the cluster grows.

Remember also that a convention is a living agreement. Review it after incidents, listen to the teams who use it, keep the written guide short and full of examples, and let automation carry the boring checks so that people can spend their attention on the meaning of the data. Start today with one page, one checker script and one honest inventory of your existing topics.

Key Takeaways

  • A topic name cannot be changed, so design it deliberately and early.
  • Use lowercase, one separator style, and a broad-to-specific order with the business domain first.
  • Name business meaning, not teams, people or tools; keep owners and details in a catalog.
  • Show the kind of data and the major version in the name where it helps rules and migrations.
  • Design prefix-based access rules and monitoring patterns around the name structure.
  • Turn off automatic topic creation and enforce names through topics as code, broker policy and regular scans.
  • Clean up old clusters gradually: stop new bad names, delete dead topics, and migrate only what is harmful.