--- # Topics are declared, never auto-created. # # Two reasons. An application account has no Create ACL — a producer that can # invent topics can also invent a typo and publish into it for weeks with nobody # noticing. And auto-created topics take the broker defaults, which is how a # topic that should be compacted and retained for a year ends up deleted after # seven days. # # One topic per aggregate. Partition count is the ceiling on consumer # parallelism and cannot be lowered later, so it is set for the traffic # expected, not for the traffic today. apiVersion: kafka.strimzi.io/v1 kind: KafkaTopic metadata: name: classic-models.catalog namespace: kafka labels: strimzi.io/cluster: kafka spec: partitions: 3 replicas: 1 config: retention.ms: "604800000" # 7 days cleanup.policy: delete min.insync.replicas: "1" --- apiVersion: kafka.strimzi.io/v1 kind: KafkaTopic metadata: name: classic-models.sales namespace: kafka labels: strimzi.io/cluster: kafka spec: partitions: 3 replicas: 1 config: retention.ms: "604800000" cleanup.policy: delete min.insync.replicas: "1" --- apiVersion: kafka.strimzi.io/v1 kind: KafkaTopic metadata: name: classic-models.payments namespace: kafka labels: strimzi.io/cluster: kafka spec: partitions: 3 replicas: 1 config: retention.ms: "604800000" cleanup.policy: delete min.insync.replicas: "1"