📁 Sangam Dhakal - Portfolio v2.0 - Netscape Navigator 4.0
_
□
×

📚 Interview question

How do you version an event schema so that old and new consumers keep working while messages of both versions are in flight?

Senior Theory Advanced

🎯 Key points

  • Additive changes first
  • Explicit version on the message
  • Consumers accept both before producers switch
  • Upcasting on read
  • Old messages live in queues, DLQs and logs
  • Schema registry compatibility modes

⏱ 30-second answer

Make changes additive where possible, so one schema serves both. When a breaking change is unavoidable, give the event a version (in the type name or a schemaVersion field), have consumers accept both (or upcast old to new on read) before producers switch, and keep old-version support until no old messages remain in queues, dead-letter queues or replayable logs. A schema registry with BACKWARD or FULL compatibility can enforce this at publish time.

🔍 What the interviewer is checking

Checks they handle queued and replayed messages, not just live HTTP calls.

↩ Usually asked after

More in Microservices

Last updated 23 Nov 2026.

🌐 Sangam's Webring

⏪ Previous 🏠 Main Next ⏩
💬 Chat with me