Skip to main content
PreparationZone Logo
PrepZone

Topic Design, Naming, and Partition Count

vaultcommerce.orders.placed.v1 — naming conventions, partition count, and replication factor for production topics.

Pass checkpoint below

Why this matters

  • VaultCommerce enforces vaultcommerce.{domain}.{event}.v{N} — grep-friendly, ACL-scoped, versioned.
  • Partition count cannot shrink; increasing partitions does not rebalance existing keys.
  • Separate topics per event type enable independent retention and consumer scaling.
  • Bad naming causes ACL sprawl and on-call confusion during incidents.
ProducersOrder, payment services
Broker cluster3+ brokers, KRaft
Consumer groupsInventory, analytics
Topic: vaultcommerce.orders.placed.v1
Partition 0Leader on broker-1
Partition 1Leader on broker-2
Partition 2Leader on broker-3
Producers write to topic partitions on brokers. Consumers read via consumer groups.

Naming conventions

Domain boundaries map to ACL prefixes: vaultcommerce.orders.*, vaultcommerce.payments.*. Version suffix (v1) allows parallel old/new consumers during schema migration. Internal CDC topics use vaultcommerce.cdc.postgres.{table}.

Key points

  • Topic registry — catalog of owners, retention, partition count, schemas
  • Version suffix — v1/v2 parallel run during consumer upgrades
  • Partition count — upper bound on consumer parallelism; plan for peak × 1.5
  • Replication factor — 3 for production; 1 only in local compose
  • Topic cleanup.policy — delete vs compact per use case

The rest of this guide is part of Pro

Free covers every fresher guide in full. Pro unlocks Senior, Staff and Architect guides across every track.

Still to come · 2 sections

  • Partition and RF planning
  • VaultCommerce rollout checklist

Test yourself

Answer these before moving on — recall is what makes it stick.