Blog

Event Schema Evolution: Old Messages Outlive Your Deployment

the queue remembers old contracts
Old and new event envelopes passing through one backward-compatible schema gate

An HTTP response disappears after a client reads it. An event may sit in a queue, archive, retry topic, or audit store for months. Old payloads can return during replay long after producers changed.

Add Before You Remove

New optional fields are usually safer than renames. Consumers should tolerate unknown fields. Producers should not assume every consumer deployed together.

Changing meaning while keeping a field name is still breaking. If amount changes from major-unit string to minor-unit integer, add a new field or event version and migrate deliberately.

Defaults Can Invent Facts

A missing country does not necessarily mean US. A default used for parsing becomes business data during replay. Distinguish unknown, absent, and actual default.

Test Stored Samples

Keep representative historical payloads and run them against new consumers. Also test a new producer payload against the oldest supported consumer where tooling permits.

Schema registries can enforce structural rules. They cannot determine whether changing CANCELLED to mean “refund pending” preserves semantics.

Document ownership, compatibility window, deprecation evidence, and replay behavior. Event evolution is API evolution with a much longer memory.