Skip to main content
PreparationZone Logo
PrepZone

Schema Registry and Compatibility Modes

Avro schemas, BACKWARD compatibility, and evolving OrderPlaced v1 to v2 without breaking consumers.

Pass checkpoint below

Why this matters

  • VaultCommerce evolved OrderPlaced v1→v2 adding optional giftWrap field with BACKWARD compatibility.
  • Incompatible schema registration fails CI — catches breaking changes before production.
  • Subject naming: vaultcommerce.orders.placed.v1-value per topic-value convention.
  • Schema evolution is the contract between 15 producer/consumer teams.
OrderPlaced v1Avro schema
Schema Registry
OrderPlaced v2Add optional field
Schema Registry enforces compatibility. BACKWARD allows new consumers to read old data.

Compatibility modes

BACKWARD (default): new schema can read old data — add optional fields with defaults. FORWARD: old consumers read new data. FULL: both directions. VaultCommerce uses BACKWARD for consumers-up-first deploys; FULL for shared library schemas.

Key points

  • Schema Registry — Confluent component storing versioned schemas
  • Subject — {topic}-key or {topic}-value schema namespace
  • Schema ID — embedded in Confluent wire format (magic byte + id)
  • BACKWARD compatibility — new consumer reads old producer data
  • DEFAULT value in Avro — required for safe field additions

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

  • Safe evolution patterns
  • VaultCommerce rollout checklist

Test yourself

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