Topic Name Convention
Topic names must follow <env>.<domain>.<entity>.<version>.
Rationale
Without a naming convention, multi-team Kafka clusters become unsearchable and ownership goes missing. A consistent pattern gives you discovery, RBAC by prefix, and policy targeting.
Pattern
^(dev|staging|prod)\.[a-z0-9-]+\.[a-z0-9-]+\.v[0-9]+$
Examples
prod.orders.placed.v1
dev.users.registered.v2
staging.payments.refunded.v3
Orders_Topic
prod.orders.placed
my-topic
PROD.orders.placed.v1
Parameters
| Name | Default | Description |
|---|---|---|
pattern |
"^(dev|staging|prod)\\.[a-z0-9-]+\\.[a-z0-9-]+\\.v[0-9]+$" |
Regex topic names must match. |
severity |
"warning" |
`warning` or `error`. |
Implementation
Drop this YAML into Conduktor Console as a ResourcePolicy, then link it from an ApplicationInstance, Application, or KafkaCluster.
Conduktor ResourcePolicy
# Conduktor self-service ResourcePolicy # Schema: https://docs.conduktor.io/platform/reference/resource-reference/self-service/#resourcepolicy # Link this policy via Application(Instance).spec.policyRef or KafkaCluster.spec.policiesRef. --- apiVersion: self-serve/v1 kind: ResourcePolicy metadata: name: topic-name-convention spec: targetKind: Topic description: Topic names must follow <env>.<domain>.<entity>.<version> rules: - condition: metadata.name.matches("^(dev|staging|prod)\\.[a-z0-9-]+\\.[a-z0-9-]+\\.v[0-9]+$") errorMessage: "Topic name must match <env>.<domain>.<entity>.<version> (e.g. prod.orders.placed.v1)"
Related policies
Try Conduktor Console
Enforce policies like this across your team — central audit history, pre-commit guardrails, ApplicationInstance bindings. 5-min Docker install.
Get Started →