The engineering async message schema compatibility decision record: why the schema evolution strategy you chose determines your producer-consumer coordination ceiling and your message loss surface
Schema compatibility in async messaging is treated as a schema registry configuration detail — a backward/forward compatibility mode toggle, an Avro schema upload, a JSON Schema document in a Git repo — not as a founding operational decision with consumer failure and data loss consequences that compound with each schema version. The first schema evolution decision propagates its compatibility model, its consumer coordination assumptions, and its silent-failure risk to every subsequent schema version and every incident caused by a producer changing its message format without testing against existing consumers. Three founding choices — the schema definition and registry model, the compatibility mode selection and override policy, and the consumer version routing model — determine how completely producer changes can be absorbed by existing consumers, how silently schema mismatches produce data loss, and how much coordination is required when a schema changes under incident conditions.
A 22-person B2B SaaS building a checkout platform for independent e-commerce brands processed orders via an event-driven pipeline on AWS SQS. When a customer completed checkout, an OrderCreated event was published as a JSON document to an SNS topic that fan-out delivered to three SQS subscriber queues: the order processing consumer, the payments consumer, and the fulfillment consumer. Each consumer was written in Java using the Jackson library. The payments consumer was implemented with the default ObjectMapper configuration — the event class was annotated with standard Jackson field annotations but had no @JsonIgnoreProperties(ignoreUnknown = true) annotation. Unknown JSON fields caused an UnrecognizedPropertyException that propagated up to the consumer's retry handler, which retried three times with exponential backoff before routing the message to the payments consumer's DLQ.
Eleven months into production, the checkout team shipped a promotional discount code feature. The OrderCreated event schema was updated to include a discountCode field — nullable String, added to support the new discount redemption flow. The field was optional (null if no discount was applied) and the checkout team's internal testing confirmed it was correctly serialized. The checkout team's service owned the producer. The payments consumer was owned by a separate team. No schema registry existed. The checkout team posted a Slack message to #checkout-consumers announcing the new field on the morning of the Friday deploy. The payments team engineer in the channel was out of office. No one from the payments team acknowledged the Slack message before the checkout team deployed to production that afternoon.
Within four minutes of the checkout team's production deploy, the payments consumer began routing every incoming OrderCreated event to its DLQ. The ObjectMapper without ignoreUnknown = true threw UnrecognizedPropertyException: Unrecognized field "discountCode" on every message. The retry handler exhausted three attempts (1-second, 4-second, 16-second backoff) in approximately 23 seconds per message. During the first 15 minutes after deploy, 847 checkout completion events accumulated in the payments DLQ. The DLQ depth alert fired at depth 50, routing a PagerDuty notification to the payments team's on-call rotation. The on-call engineer, one who was not the out-of-office engineer familiar with the Slack message, began investigating the DLQ contents and identified the unknown field in the first sampled message body.
The payments team identified the fix — adding @JsonIgnoreProperties(ignoreUnknown = true) to the OrderCreated event class — but the fix required a code change, a pull request review by one other engineer, and a deployment, which took 42 minutes from DLQ depth alert to fixed consumer deploy. All 847 messages required replay. Before initiating the replay, the payments team engineer verified that the payments consumer was idempotent for all OrderCreated events — the payment processor SDK supported idempotency keys and the consumer passed the order ID as the idempotency key — and confirmed that none of the 847 DLQ messages had reached the payment capture step. All failures had occurred at the deserialization step, before any state change was written. The replay succeeded without duplicate charges.
The 42-minute window between the checkout team's deploy and the fixed consumer deploy meant that 847 customers had completed checkout, received order confirmation emails from the fulfillment consumer (which used a different deserializer library that defaulted to ignoring unknown fields), and were waiting for their orders — but no payment had been captured for any of those 847 orders. The payments team sent a notification to the customer success team to handle any customer inquiries during the payment reprocessing window. Three customers had contacted support within the 42 minutes to ask why their payments had not gone through. The replay completed successfully and no customer lost a payment, but the fulfillment team had generated pick lists for 847 orders where payment had not yet been captured — a workflow state that the fulfillment system's design did not anticipate.
A 38-person data platform company providing a customer analytics service processed user identity events via Apache Kafka. All Kafka topics used Confluent Schema Registry for schema management, configured eighteen months earlier when the platform team established the event-driven messaging standard. The initial schema governance decision was to configure all topics with BACKWARD compatibility mode — the strictest enforcement the team felt they could implement without slowing development velocity. BACKWARD compatibility meant that new schema versions could be read by old consumer schema versions — specifically, that the new schema preserved all fields that the old schema defined, with compatible types and defaults for any new fields. Consumers could safely be deployed before producers because a consumer running the new schema version could still correctly process messages from an old producer running the previous schema version.
The marketing data team owned the CustomerProfile Kafka topic, which carried user profile events consumed by the marketing automation service and the billing reconciliation service. After a product requirements change that standardized field naming across the platform, the marketing data team needed to rename the user_email field to email. Field renaming is not backward compatible — an Avro consumer reading the renamed schema would find email present and user_email absent; if the consumer's field mapping used user_email, it would receive null. The Confluent Schema Registry with BACKWARD mode correctly rejected the registration attempt: Schema being registered is incompatible with an earlier schema; reader field 'user_email' not found in writer schema.
The marketing data engineer, working against a sprint deadline, was not familiar with Avro schema compatibility semantics. The rejection message described an incompatibility between reader and writer schemas — but the engineer interpreted it as a permissions failure. They did not have schema registry admin write access to the CustomerProfile topic's subject — only the platform team could register schemas for topics they did not own. The engineer opened a Jira ticket for the platform team: "Need help registering new CustomerProfile schema version — getting a permissions error." The ticket did not include the registry rejection message.
The platform team engineer who processed the ticket verified that the marketing data engineer did not have schema registry write permissions for CustomerProfile. Without reading the full rejection reason (the Jira ticket described it as a permissions issue, not a compatibility issue), the platform engineer escalated the marketing data engineer's registry permissions to include the CustomerProfile subject and updated the topic's compatibility setting to NONE to unblock the deployment, noting in the ticket: "Permissions updated, compatibility mode set to NONE for this topic to allow the rename." The marketing data engineer registered schema version 7 of the CustomerProfile schema with the renamed email field and deployed the marketing data producer.
Both consumers of the CustomerProfile topic used Avro deserialization with explicit field-name mapping to Java objects. The marketing automation service mapped user_email to its recipient address field. With BACKWARD mode in effect, the consumer would have needed to be updated before the producer deployed version 7. With NONE mode, the registry accepted version 7 without compatibility verification, and the marketing automation service began receiving messages where user_email was absent (the field had been renamed to email). The Avro deserializer's default behavior for absent fields in the reader schema was to substitute the field's declared default — the marketing automation service's reader schema declared user_email with no default, which Avro resolved to null. The service's campaign trigger logic received null for the recipient address, applied its null guard (skip the recipient if email is null), and silently stopped queueing campaign emails for all users whose CustomerProfile events had been produced after the version 7 deploy. No exception was thrown. The campaign queue depth dropped to zero and stayed there. The campaign delivery alert was configured on campaign send failure rate, which was zero — zero sends were attempted, zero failed. No alert fired.
Three days after the marketing data team's deploy, a customer of the data platform emailed to report that their marketing activation campaign had stopped sending emails to new users. The marketing automation team investigated the zero-queue-depth state, traced the null user_email field back to the Avro deserialization output, and from there to the schema version 7 change and the NONE mode override. The fix required the marketing data team to publish schema version 8 that added an Avro field alias on the email field mapping to user_email in the reader schema, deploy the fix, and replay three days of CustomerProfile events from the Kafka topic's offset log to backfill the marketing automation service's campaign queue. The billing reconciliation service had the same null-field issue: it used user_email as the external identifier on invoice headers, and 2,400 invoices generated during the three-day window had blank email headers. The billing team identified the blank headers at month-end billing run when customers reported receiving invoices without email addresses. Correcting 2,400 invoice headers required a backfill job that pulled the correct email addresses from the customer database by joining on account ID.
A 61-person FinTech company processing payment transactions across multiple internal services had an internal event bus built on RabbitMQ. The event system used a version envelope pattern: every event was published as a JSON document with the structure {"schemaVersion": "1.3.0", "type": "PaymentProcessed", "payload": {...}}. The consumer framework routed messages to versioned handler methods based on the schemaVersion field. Handler methods were annotated with @HandleVersion("1.x.x") to match all messages with a 1.x.x schemaVersion (using semver range matching), or with @HandleVersion("1.0.0") to match only an exact version. Handler methods without a @HandleVersion annotation served as catch-all handlers for all versions. When no handler matched a message's schemaVersion, the consumer framework logged at INFO level: No handler found for PaymentProcessed version 1.1.0, message dropped and acknowledged the message without routing it to any application code.
The system had been in production for fourteen months. During those fourteen months, the payments team had published six minor schema versions of PaymentProcessed: 1.0.0 at launch, 1.1.0 eleven months prior (added processingFeeAmount field), 1.2.0 nine months prior (added currencyCode field), 1.3.0 seven months prior (added merchantCategoryCode field, refactored from a free-text field to a standardized enum), 1.4.0 five months prior (added riskScore field), and 1.5.0 three months prior (added paymentNetworkTransactionId field for card network compliance). Each minor version had been announced to the #payments-consumers Slack channel with a one-line description of what field was added.
Three services consumed PaymentProcessed events: the reconciliation service, the reporting service, and the notification service. The reconciliation service's handler was annotated @HandleVersion("1.x.x") — a range that matched all 1.x.x versions. The reporting service's handler had no annotation — a catch-all that processed all versions regardless of schemaVersion. The notification service's handler had been written at system launch by the engineer who had designed the original version envelope pattern. At system launch, 1.0.0 was the only version, and the engineer had annotated the handler with @HandleVersion("1.0.0") — an exact match. The annotation was added for clarity, to document which schema version the handler had been written against. The engineer left the company seven months after launch. No one on the notification team had reviewed the annotation since.
When version 1.1.0 was published eleven months prior, the notification service's consumer framework began logging No handler found for PaymentProcessed version 1.1.0, message dropped at INFO level for every incoming PaymentProcessed event. The notification service's monitoring showed zero PaymentProcessed consumer errors. The service's health dashboard showed zero messages processed for PaymentProcessed, but there was no alert configured for handler throughput dropping to zero — the alert infrastructure monitored consumer lag on the RabbitMQ queue (which was zero because messages were being acknowledged by the consumer framework, not queued), error rates (which were zero because the INFO log did not increment any error counter), and downstream notification delivery failures (which were zero because no notifications were attempted). The notification service appeared completely healthy. For eleven months.
The issue surfaced when the payments team planned to publish PaymentProcessed version 2.0.0 — a semver-major structural change that flattened the nested payment_method object into top-level fields. The semver-major change prompted the payments team lead to perform a consumer audit before deploying, specifically to identify which consumers would need annotation updates to handle version 2.x.x. The audit involved pulling the handler annotations from each consumer service's codebase. The reconciliation service's @HandleVersion("1.x.x") would stop matching version 2.0.0 messages — the team updated it to @HandleVersion with a 1.x.x and 2.x.x union range annotation. The reporting service's catch-all required no change. The notification service's @HandleVersion("1.0.0") had been dead for eleven months — a fact that became apparent when the payments team asked the notification team to confirm their annotation and the notification team lead ran a grep for @HandleVersion in the notification codebase.
Investigating the full scope required pulling eleven months of consumer framework INFO logs from cold archival storage — a four-hour log extraction exercise across three log archival systems, because the team had rotated log storage infrastructure twice in eleven months. The extracted logs confirmed that approximately 340,000 PaymentProcessed events (versions 1.1.0 through 1.5.0) had been silently dropped by the notification service consumer framework over the eleven-month period. The notification service's intended function was to trigger payment confirmation SMS messages to cardholders after each payment. For eleven months, no payment confirmation SMS had been sent. The absence of SMS confirmations had not triggered customer complaints because the email confirmation flow — handled by a separate service consuming a different event type — was still working, and customers rarely noticed the missing SMS unless they had explicitly enabled SMS-only confirmation. The FinTech company's compliance team identified the eleven-month gap as a potential regulatory issue: payment confirmation notifications were an audit trail element in the company's card network compliance documentation. The compliance assessment required a formal incident review and a report to the card network compliance team. The notification service's annotation was updated to a catch-all handler, the service was redeployed, and future confirmations resumed correctly. The eleven months of missed confirmations were not replayable — the RabbitMQ messages had been acknowledged at the time of delivery, and no replay mechanism existed for acknowledged messages.
Structural properties set by the schema compatibility decision
Two structural properties are determined by the founding decisions about schema definition, compatibility mode, and consumer version routing. Both are invisible during early development when producer and consumer teams are small, co-located, and informally coordinated. Both become visible when teams diverge in release cadence, when schema changes are made under time pressure, and when consumer teams cycle through personnel who did not participate in the original schema design.
Property 1: Producer-consumer coordination ceiling. The producer-consumer coordination ceiling is the highest fidelity of coordination that any producer and consumer team can achieve when evolving event schemas — the most reliable, most change-safe, least-surprise upgrade path — bounded by the properties of the schema compatibility model the team has established. Three components. The schema visibility model component: when producer and consumer teams have no shared schema definition, coordination happens via informal channels — a Slack message, a Confluence page, a PR comment — and the consumer team's response depends on whether the informal communication reaches the right engineer before the producer deploys; schema registry makes the contract machine-enforceable, but only if the registry's compatibility checks are not bypassed when they produce inconvenient rejections; a schema registry whose compatibility mode can be overridden by an infrastructure engineer to unblock a release provides the same informal coordination guarantee as no registry at all, because the override happens specifically when the registry is working as designed — detecting a contract violation — and the team is under time pressure to ship; the schema visibility model's ceiling is the ceiling of the registry's enforceability, and the registry's enforceability ceiling is set by the override policy. Connect to the event-driven architecture decision record: the architecture decisions that determine whether the system uses a centralized event bus (Kafka, EventBridge) or point-to-point queues (SQS SNS fan-out) affect where the schema visibility model is enforced; a centralized event bus with a single schema registry provides a single enforcement point for all producer-consumer relationships on the bus, while point-to-point queues may have different schema enforcement at each producer-consumer pair, producing an inconsistent enforcement surface where some pairs have registry enforcement and others rely on informal coordination. The compatibility mode selection component: the compatibility mode is the only durable specification of the coordination protocol between producer and consumer teams; BACKWARD mode (new schema can be read by old consumer) defines that the consumer team must have deployed their schema update before the producer team can deploy a new schema version — the consumer team absorbs the coordination burden of deploying first; FORWARD mode (old consumer can read new schema) defines that the producer team may deploy first and the consumer team will update at their own pace — the producer team absorbs the constraint of only publishing forward-compatible changes; FULL mode (both directions, either team deploys first) eliminates deployment order coordination entirely for compatible changes but restricts the allowable change surface to the intersection of backward and forward compatibility; NONE mode eliminates enforcement and requires that all coordination happen via informal process — appropriate only for intra-team topics where producer and consumer share a codebase and deploy together; the ADR that records the compatibility mode selection must also record which team absorbs the deployment-order burden and why that burden distribution is appropriate for the teams' release cadences. The breaking change governance component: compatibility mode enforcement is necessary but not sufficient — BACKWARD mode will reject a field rename (which is incompatible) but will not prevent an infrastructure team from overriding the rejection; whether a compatibility rejection prompts a team to understand the violation or to escalate it as a permissions block depends on the team's shared understanding of what constitutes a breaking change; teams without a written breaking-change classification policy discover the definition empirically via production failures, and the classification that emerges from production incidents is inconsistent and reactive — different engineers make different classifications under time pressure, and the resulting schema evolution conventions are whatever the team collectively learned not to do, not what the team collectively agreed was safe to do. Connect to the API versioning decision record: the API versioning decisions that govern how REST or gRPC API changes are classified and communicated apply directly to async event schemas when the event schema is treated as a public API surface; the same backward-compatibility classification framework — additive changes are safe, non-additive changes require a migration path — applies in both synchronous and asynchronous contexts, but async schemas have an additional constraint that synchronous APIs do not: a REST API client that cannot parse a response can retry the request, but an async consumer that cannot deserialize a message either routes it to a DLQ (if strict) or silently nulls fields (if permissive), and the distinction between those two outcomes is determined by the consumer's deserializer configuration rather than by the schema change itself.
Property 2: Message loss surface. The message loss surface is the aggregate amount of event data that can be irrecoverably lost or silently dropped due to schema mismatch between producer and consumer, measured in message count and business impact. Three components. The consumer failure model component: when a consumer encounters a schema change it was not prepared for, the failure takes one of two forms — strict failure (exception thrown, message retried, message routed to DLQ after retry exhaustion, DLQ depth alert fires within hours; the message is recoverable but the incident is immediately visible) or silent degradation (null field received, no exception thrown, business logic receives null values and applies whatever null guard exists, no alert fires; the degraded state may persist for days or weeks before downstream business impact becomes visible); the distinction between strict and silent failure is determined by the consumer's deserializer configuration; a Jackson ObjectMapper without @JsonIgnoreProperties throws an exception on unknown fields — strict failure, immediately detectable; a Jackson ObjectMapper with @JsonIgnoreProperties(ignoreUnknown = true) silently nulls the new field — silent degradation, undetectable until downstream logic produces incorrect output; neither behavior is universally correct — strict failure is preferable when any new field from the producer is intended to be used by the consumer (catching the missing handler update early is better than silently receiving null for months), while silent tolerance is preferable when the consumer is intentionally schema-tolerant (reading a subset of fields, using sensible defaults for absent fields); the ADR specifies which model applies to each consumer and event type, so individual engineers do not set deserializer configurations based on personal preference. Connect to the dead letter queue management decision record: the DLQ management decisions that govern retention period, alerting, and replay authorization interact directly with the consumer failure model — a consumer that uses strict deserialization routes schema mismatch failures to the DLQ, where the message loss surface is bounded by the DLQ retention period (recoverable within the retention window, irrecoverable after expiry); a consumer that uses silent tolerance never routes messages to the DLQ, eliminating the DLQ retention constraint but replacing it with an unbounded silent degradation window; the DLQ management ADR's retention and alerting decisions are designed against the strict-failure model — they cannot surface the silent-degradation mode, which requires application-layer business metric monitoring (campaign queue throughput, invoice generation rate) rather than infrastructure-layer queue monitoring. The schema registry override model component: when the schema registry compatibility mode can be overridden by an infrastructure team to unblock a release, the enforcement guarantees evaporate at exactly the moments when producers are under time pressure — a compatibility rejection during a sprint release is interpreted as a blocker rather than a contract signal, and the engineer with the unblock authority is asked to remove the blocker rather than to understand the violation; the schema registry override is structurally indistinguishable from the schema registry not existing, because the cases where the override is applied are specifically the cases where the registry is performing its core function; schema registry compatibility overrides require the same documentation and approval level as a production change freeze exemption — the approver is the application team's tech lead who understands the downstream consumer impact, not the infrastructure team's support engineer who can verify that the registry is technically accessible. Connect to the secrets management decision record: the secrets management decisions that govern which configuration values require audit trails and change approvals apply the same governance model that schema registry overrides require — both are cases where an infrastructure-layer change (rotating a secret, overriding a compatibility mode) has application-layer correctness consequences that are not visible to the infrastructure team making the change; the approval workflow for schema registry overrides should be as well-defined as the approval workflow for production secret rotation. The version envelope consumer completeness component: the version envelope pattern provides schema evolution routing without a registry, but introduces a consumer completeness problem — the envelope routes messages to versioned handlers, and unregistered versions produce a framework-level log entry or a silent acknowledgment rather than an application-level alert; the stale handler is structurally indistinguishable from a healthy handler with zero message volume on that version, because zero-messages-processed is the same metric value whether the consumer is correctly handling a low-volume topic or silently dropping every message due to a stale version annotation; the only mechanism that surfaces the distinction is a last-processed-timestamp alert (alert when no message has been processed by this handler within 2× the expected message interval for the event type), which must be implemented separately from error-rate monitoring because error-rate monitoring cannot distinguish between a handler that is healthy with zero traffic and a handler that is silently acknowledging all traffic without processing it; the consumer completeness monitoring is a CI and deployment gate responsibility — before a new service is deployed that consumes a versioned event topic, the deployment gate verifies that every subscribed event type has a handler that covers the current production schema version, and that the handler's version annotation is a range (covering future minor versions) rather than an exact match (covering only the version at the time the handler was written). Connect to the alerting threshold decision record: the alerting threshold decisions that govern what metrics are monitored and at what thresholds apply directly to the consumer completeness monitoring design — a handler with zero messages processed over a 24-hour window on an event type that normally produces hundreds of events per hour requires a P1 alert; a handler with zero messages processed over a 24-hour window on an event type that normally produces one event per week requires no alert because zero is within the normal range; the threshold calibration for handler throughput alerts must reference the expected message interval for each event type, not a fixed count threshold.
The schema compatibility ADR: five sections
Section 1: Schema definition and registry model. The schema definition and registry model defines how schemas are authored, stored, versioned, and distributed to consumers. The ADR must specify one of three tiers based on the team's size and inter-team dependency structure. Schema-less (no registry, no enforcement, documentation-only): appropriate only for intra-team events where the producer and consumer are in the same codebase and are always deployed together — a schema change to an intra-service event that is consumed only within the same deployment unit cannot produce a production schema mismatch because the producer and consumer are co-deployed; schema-less is not appropriate for any inter-team event topic where the consumer team does not control the producer's release schedule. Schema-in-code (Avro, Protobuf, or JSON Schema files committed alongside producer code, consumers reference by file path in a shared schema repository or by git submodule): appropriate for teams where the schema change coordination overhead of a registry is higher than the inter-team coordination cost — specifically, small teams with a shared monorepo or a tightly-coupled polyrepo where schema PRs are reviewed by both producer and consumer teams before merge; the schema-in-code model provides human-reviewable schema changes (the schema diff is visible in the PR) but does not provide machine-enforced compatibility checks at registration time; CI compatibility checks (running Avro schema diff tools or Protobuf breaking change detectors as part of the schema PR build) can approximate registry-level enforcement. Schema registry (Confluent Schema Registry, AWS Glue Schema Registry, or equivalent service): required when producer and consumer teams deploy independently, when any inter-team event topic has 2+ consumer teams with independent release schedules, or when the event type carries compliance-sensitive data (payment events, PII events, audit events) that requires machine-enforceable schema change governance; the schema registry is the enforcement point for compatibility mode selection (Section 2) and must be treated as a production-critical service with its own reliability targets — a schema registry outage that prevents schema registration blocks all producer deployments that include schema changes; producer deployments must have a defined compatibility check fallback (fail-open with a manual sign-off, or fail-closed requiring schema registry availability) documented in the deployment runbook. The ADR specifies which tier applies to each event topic category — intra-team topics (schema-less), cross-team topics with low consumer count and shared codebase access (schema-in-code), and inter-team topics with independent deployment schedules or compliance requirements (schema registry). Schema registry ownership: the schema registry is owned by the platform team for infrastructure operations (uptime, backup, upgrade) but schema subject ownership (which teams can register schemas for which topics) is per-team, with the application team that owns the topic's producer holding write access to the topic's schema subject. Infrastructure team write access to topic schema subjects is restricted to topic creation and emergency incident response — not routine unblocking of producer deployments.
Section 2: Compatibility mode selection and override policy. The compatibility mode selection defines the enforcement mode applied to each event topic's schema subject in the registry, the rationale for the mode, and the override policy for changing modes. BACKWARD compatibility as the default for all inter-team event topics: new schema versions can be read by consumers running the previous schema version — consumers may be deployed before or after the producer, because the old consumer can still process old producer messages; BACKWARD mode is the right default because it protects the consumer teams (who cannot always coordinate deployment timing with the producer team) while imposing the compatibility constraint on the producer team (who can verify compatibility before registering a new schema version). FORWARD compatibility when producer release velocity is high relative to consumer team capacity: new producer schema versions are still readable by consumers running the previous schema version — producers may deploy first, consumers update at their own pace; FORWARD mode imposes the coordination cost on the consumer teams (they must deploy before the safety guarantee expires) and is appropriate when the producer team has strong control over their release schedule but limited ability to block on consumer team deployments. FULL compatibility for compliance-sensitive event types (payment events, PII events, audit events) and for topics with 3+ consumer teams: both old consumers reading new messages and new consumers reading old messages work correctly — either team deploys in any order without coordination; FULL compatibility is the most restrictive mode (fewer schema changes are permitted) but eliminates deployment order coordination entirely; the additional constraint is worth the coordination cost elimination for topics where deployment-order mistakes carry regulatory or financial consequences. NONE compatibility only for intra-team topics (schema-less tier) or as a time-limited exception: requires explicit documentation in the topic ADR — the team that requested NONE, the reason BACKWARD/FORWARD/FULL could not be used, the specific schema change that required NONE, and the migration plan to restore a compatibility mode after the transition is complete; NONE exceptions are time-bounded (maximum 30 days) and require a follow-up ADR task to restore enforcement. Override policy: changing a topic's compatibility mode from BACKWARD/FORWARD/FULL to NONE requires the application team's tech lead sign-off (not the infrastructure team's), documented in the topic ADR with the same information as a NONE exception above; the infrastructure team's role in an override is to execute the registry API change after receiving the signed ADR — not to approve the override; a Jira ticket requesting a "permissions fix" on a schema registry rejection is not a valid override request; the platform team's support runbook specifies that schema registry compatibility rejection tickets must be triaged by asking "is this a permissions error or a compatibility error?" — resolved by asking the requestor to share the full error message, not by escalating permissions before reading the error. Connect to the API versioning decision record: the API versioning decisions that govern SemVer usage and deprecation windows apply the same conceptual framework as schema compatibility mode selection — BACKWARD compatibility corresponds to a semver minor version increment (additive changes only, old clients still work), FORWARD compatibility corresponds to requiring clients to handle new server responses that old server versions would not have produced, FULL compatibility corresponds to the strictest semver guarantees where neither side can break the other; the compatibility mode ADR can reference the API versioning ADR for the team's existing SemVer classification conventions rather than introducing a separate schema-specific classification.
Section 3: Breaking change classification. The breaking change classification defines which schema changes are safe (compatible under any mode), which are breaking (require a compatibility migration cycle), and which are semver-major (require a new topic name). Without an explicit written classification, engineers make classification decisions under sprint deadlines by consulting colleagues, checking Stack Overflow, or running the schema registry compatibility check and treating a rejection as an ambiguous blocker. Safe changes (additive — compatible under BACKWARD, FORWARD, and FULL): adding a new optional field with a schema-level default value; adding a new enum value at the end of an existing enum list (Avro — requires care with Protobuf where enum value ordering semantics differ); adding a new message type to an existing multi-type topic without modifying existing message types; adding new fields to the event envelope wrapper (such as adding a new metadata field to the version envelope header) if the envelope parser ignores unknown fields by design. Breaking changes (semver-minor bump — require a compatibility migration cycle): removing any existing field (remove the field only after all consumers have been updated to not reference it — dual-write period); renaming any existing field (equivalent to removing the old field and adding a new field — use Avro aliases or dual-write to migrate); changing an existing field's type in a narrowing direction (string to integer, nullable to non-nullable — requires consumer updates before the type constraint is enforced); adding a new required field without a default (all existing consumers must be updated before the producer can remove the default); removing an existing enum value that existing consumers may send or receive. The dual-write migration pattern for breaking changes: the producer publishes both the old and the new field names simultaneously (old field preserved for backward compatibility, new field added for forward compatibility) for a migration period of minimum 7 calendar days or the longest known consumer deployment cycle, whichever is longer; during the dual-write period the schema is FULL-compatible because both old and new fields are present; after the migration period, a second schema version removes the old field; the dual-write migration converts a breaking change into two safe changes. Semver-major changes (require a new topic name, old topic deprecated): structural restructuring of the payload (flattening nested objects into top-level fields, restructuring a flat schema into nested objects); changing the event envelope structure (changing the schemaVersion field name, changing the wrapper format from JSON to Avro); changing the serialization format (JSON to Avro, Avro to Protobuf); merging or splitting event types. For semver-major changes, the new topic name follows the convention event_type_v2; the old topic is deprecated with a minimum 90-day deprecation window; the new topic's schema subject is registered with BACKWARD or FULL compatibility mode from its first version rather than inheriting the old topic's configuration. Connect to the dead letter queue management decision record: the breaking change classification determines which consumer failure mode (strict or silent) will be triggered by an uncoordinated schema change — a field removal on a consumer with strict deserialization will cause DLQ accumulation immediately (strict failure, detectable); a field removal on a consumer with silent tolerance will cause null values in the business logic (silent degradation, undetectable for days); the DLQ management ADR's routing model must specify which schema change failure categories route to the main DLQ versus the poison-message store — deserialization failures caused by field removals and type changes are schema-mismatch failures, not transient processing failures, and routing them to the main DLQ mixes irrecoverable schema errors with replayable transient failures.
Section 4: Consumer version routing model. The consumer version routing model defines how consumers handle multiple schema versions of the same event type — both when new versions are added by the producer and when old versions remain in-flight during migration periods. Three viable models. Implicit schema evolution (preferred for BACKWARD/FULL compatible schemas): the consumer tolerates unknown fields and absent fields gracefully without explicit version-specific handling — in Jackson, @JsonIgnoreProperties(ignoreUnknown = true) on the event class; in Protobuf, unknown field retention by default; in Avro, reader schema defaults for absent fields; the consumer does not need version routing because it handles all backward/full-compatible versions transparently; this model eliminates the stale-annotation risk by removing version routing from the consumer entirely; it is appropriate when the schema's compatibility mode is BACKWARD or FULL and the consumer uses only a subset of the event's fields — the consumer will receive null for fields in its reader schema that are absent in the message (resolved via Avro reader schema defaults or null guards in business logic) and will silently ignore fields in the message that are absent in its reader schema. Explicit version routing with range annotations (required for semver-major transitions or version envelope patterns): the consumer framework routes messages to version-specific handlers based on a version range annotation — @HandleVersion("1.x.x") matches all 1.x.x messages, @HandleVersion("2.x.x") matches all 2.x.x messages; range annotations (semver range matching) are required, exact-version annotations (@HandleVersion("1.0.0")) are prohibited except for the initial version at system launch, and must be migrated to range annotations at the first schema version bump; every versioned consumer must include either an exhaustive set of range handlers that cover all deployed schema versions or a catch-all handler with a P2 alert for unmatched versions. Consumer completeness monitoring: the CI pipeline for every service that consumes a versioned event topic must run a schema version coverage check — for each subscribed event type, the check verifies that the consumer has a handler registered that covers the current production schema version (queried from the schema registry or from the shared schema-in-code repository), and that the handler annotation is a range (not an exact version); a CI check that fails on stale exact-version annotations catches the annotation drift before it reaches production. Deployment gate: before deploying a consumer that uses version routing, the deployment pipeline verifies that the last-processed-timestamp for each event type's handler has been populated within 2× the expected message interval — a consumer that has never processed any messages for a registered handler may have a stale annotation from day one; the deployment gate fails if a registered handler has no last-processed-timestamp (indicating it has never processed a message in the staging environment).
Section 5: Schema change governance model. The schema change governance model defines the process for proposing, reviewing, and deploying schema changes, including the documentation required in pull requests, the consumer team notification protocol, and the monitoring commitments that follow a schema version deployment. Schema change PR checklist: (1) compatibility mode check (CI runs the schema registry compatibility check as part of the PR build; the build fails on incompatible registration — not a warning that can be bypassed, a build failure that blocks merge; the PR author must resolve the incompatibility or document a semver-major migration path before the PR is approved); (2) breaking change classification (the PR description must include the breaking change tier — safe, breaking, or semver-major — from the classification taxonomy in Section 3; for breaking changes, the PR must include the dual-write period start date and the planned date for the follow-up PR that removes the deprecated fields); (3) consumer impact survey (the producer team lists all known consumer teams in the PR description and tags each team's tech lead for review; consumer team tech leads must acknowledge the schema change in the PR — either confirming that their consumer handles the new version transparently, confirming that their consumer update PR is in progress with a link, or requesting a compatibility extension; a schema change PR may not merge until all known consumer teams have acknowledged; unknown consumer groups — consumer groups visible in the broker but not on the known-consumers list — are treated as requiring backward compatibility from the new schema version); (4) DLQ monitoring commitment (all impacted consumer teams set a DLQ time-in-queue alert for 24 hours following the schema version deployment, regardless of normal DLQ volume; the 24-hour heightened monitoring window is the first line of defense against a consumer team that acknowledged the schema change but deployed their consumer update after the producer deployed a new schema version — the DLQ depth alert within the 24-hour window is the detection mechanism for this race condition); (5) consumer completeness verification (for topics using version routing, the producer team verifies after deployment that all known consumer teams' handlers have last-processed-timestamps populated within 2× the expected message interval — a handler that remains at zero messages processed for longer than 2× the interval after a schema version deployment may have a stale annotation; the producer team pages the consumer team's tech lead if the handler throughput does not appear within the expected interval). Schema version retention policy: old schema versions are retained in the registry for minimum of 2× the longest known consumer deployment cycle (minimum 30 days) before being marked deprecated; deprecated versions are retained for an additional 30 days before deletion; the retention policy prevents breaking consumers that are slow to update from encountering a schema version deletion before they have deployed their schema update. Connect to the API deprecation policy decision record: the API deprecation decisions that govern deprecation notice periods, sunset timelines, and consumer communication apply the same framework to schema version deprecation — the deprecation notice period for a schema version is the minimum time between marking a version deprecated and deleting it from the registry, and must account for the slowest consumer team's deployment cycle; the communication format for schema version deprecation should match the team's existing API deprecation communication format rather than introducing a separate schema-specific communication process.
FAQ
What constitutes a backward-compatible schema change in async messaging?
Backward compatibility in async messaging means that a consumer running the previous schema version can correctly process messages produced with the new schema version — specifically, that no existing field is removed, renamed, or narrowed in type. The changes that are universally safe (backward compatible in Avro, Protobuf, and JSON Schema): adding a new optional field with a schema-level default value; adding a new enum value at the end of an existing enum list (Avro — Protobuf handles unknown enum values differently); adding a new message type to an existing topic without modifying existing message types. The changes that are not backward compatible and will be rejected by a schema registry configured with BACKWARD mode: removing any existing field; renaming any existing field (renaming is equivalent to removing the old field and adding a new field — a consumer reading the renamed field by old name receives null); changing an existing field's type in a narrowing direction (string to integer, nullable to non-nullable); adding a new field that is required without a schema-level default (old consumers encountering a message that includes the new required field will apply whatever fallback the deserializer uses — null, exception, or default — depending on the deserializer's configuration). The nuanced cases that require explicit ADR documentation: type widening (integer to long) is backward compatible in Protobuf (numeric widening is defined as compatible) but may not be in Avro without explicit schema promotion configuration; default value changes (changing the default for an existing optional field) are technically compatible but change the semantics of old messages that do not include the field — an old consumer applies the old default to old messages, but a consumer running the new schema applies the new default to old messages, which may produce incorrect behavior if the default change is semantically significant; field reordering is not backward compatible in position-based serialization formats (CSV, some binary protocols) but is compatible in name-based formats (JSON, Avro with named fields, Protobuf). The practical rule for teams without a schema registry: treat any change to an existing field — rename, type change, removal, default change — as a breaking change requiring the dual-write period, and implement it as an additive migration (dual-write both old and new field names for a minimum of one full consumer deployment cycle) rather than as a direct modification. The additive migration pattern is backward compatible by construction because no existing field is removed until after all consumers have been updated.
How do you handle schema evolution when you don't control all consumers of a Kafka topic?
Schema evolution without control over all consumers requires treating the topic as a public API surface — backward compatibility is a hard constraint rather than a coordination preference, because there is no reliable mechanism to verify that all consumers have been updated before deploying a new schema version. Three practices that enable safe evolution under these conditions. First, schema registry with FULL or BACKWARD compatibility mode: the registry enforces at registration time that the new schema can be read by old consumer schema versions, so the producer can deploy without coordinating with consumer teams — old consumers continue processing correctly, new consumers handle new fields; FULL compatibility (bidirectional) is the safest default for public topics because it allows both producers and consumers to deploy in any order. Second, the additive migration pattern for field renames and type changes: when a truly backward-incompatible change is required — a field rename, a type change, a structural restructuring — implement it as a two-phase additive migration: phase 1 deploys the new field alongside the old field (the producer writes both old and new field names simultaneously, keeping the old field populated for a full migration period — minimum 7 days or the longest known consumer deployment cycle); phase 2 removes the old field after all known consumers have been updated; during the phase 1 period the schema is FULL-compatible, so the registry will accept both phases; the additive migration pattern eliminates the need for a semver-major topic rename for most field-level changes. Third, the consumer group audit: for topics with unknown or uncontrolled consumers, the producer team should maintain a known-consumers list (extracted from consumer group IDs in the Kafka broker or from the service registry) and perform a compatibility assessment against each known consumer before deploying a new schema version — not by contacting each team, but by reading each consumer's schema version pinning and verifying that the new schema version is compatible with it; unknown consumer groups that are not in the known-consumers list should be assumed to be pinned to the current schema version and treated as constraints on what changes are safe to make; the first step of any schema change PR for a public topic is to run kafka-consumer-groups --list and cross-reference against the known-consumers list to identify any new unknown consumer groups that have appeared since the last schema version.
What should a team do when a schema registry rejects a schema registration due to a compatibility failure?
A schema registry compatibility rejection is a contract signal, not a permissions error. The correct response is to understand what the registry is telling you before escalating to an infrastructure team to override the check. Three steps. First, read the full rejection message: Confluent Schema Registry returns a specific error message that identifies the incompatible change — for example, reader field: user_email not found in writer schema and has no default value for a field removal, or Schema being registered is incompatible with an earlier schema: BACKWARD incompatible for a broader incompatibility; the error message tells you exactly which change is incompatible and in which direction; a rejection described only as "permissions error" in a Jira ticket has not been read. Second, classify the change: is this a field rename (should be executed as an additive migration with dual-write), a field removal (requires a migration period after all consumers have dropped the field from their deserialization), a type change (may require additive migration or a semver-major topic rename depending on the type change direction), or a structural restructuring (requires a new topic name)? Third, choose the appropriate migration path: for changes that can be made backward compatible with the additive migration pattern, implement the additive pattern rather than overriding the registry; for changes that genuinely cannot be made backward compatible without a major restructuring, use a new topic name rather than overriding the compatibility mode. The override to NONE compatibility mode is a last resort that requires the application team tech lead's documented sign-off and a migration plan to restore enforcement — not a first-response unblock executed by an infrastructure engineer in a Jira ticket. The teams most at risk of overriding the registry are teams where the schema registry is managed by a separate platform team — the platform team has the technical authority to override but lacks the application context to understand what the override means for downstream consumers; schema registry override requests should route to the application team's tech lead for approval, not to the infrastructure team's support queue.
How do schema compatibility decisions connect to AI chat sessions and decision preservation?
Schema compatibility decisions are made when the first event topic is configured — the founding engineer picks a serialization format, decides whether to use a schema registry, selects a compatibility mode, and designs the consumer framework's version routing model — and those decisions are almost universally made in AI chat sessions where the team works through the tradeoffs in real time: whether to use Avro with Confluent Schema Registry (strict, enforced at publish time, requires running a registry service) versus JSON with schema-in-code (flexible, no registry operational overhead, requires discipline and informal coordination); which compatibility mode to enforce and what the override policy should be; whether to use a version envelope pattern (simpler than a registry for small systems, but introduces the stale-handler risk — handlers annotated to specific schema versions silently drop messages for unmatched versions) versus implicit schema evolution (consumers tolerate unknown fields by default, trading strict enforcement for silent partial-data risk); and what the breaking-change classification policy is — specifically whether field renames are breaking (yes, equivalent to removing the old field), whether type widening is format-dependent (yes, Protobuf and Avro handle numeric widening differently), and whether adding required fields without defaults is breaking (yes, old producers will omit the field). The reasoning in those sessions — the specific tradeoff between Avro's schema enforcement and its registry operational cost, the specific analysis of whether FULL compatibility is too restrictive for the team's release velocity, the specific decision about which consumer framework handles unmatched versions as errors versus as INFO-level drops — is the substance of the schema compatibility design. It is almost universally made and immediately discarded, leaving every engineer who joins the team afterward to infer the schema evolution policy from the registry configuration and the consumer code rather than from a documented decision. The engineer who asks "why are we using BACKWARD compatibility instead of FULL on the payment events topic?" will get "that was the default we configured" rather than the founding reasoning — unless the AI chat sessions that made the decision were run through the open-source extractor and the decision record was produced at the time the first topic was configured. The decision record allows the engineer inheriting the schema governance model to understand why BACKWARD was chosen instead of FULL (at four services and two consumer teams, the team's release cadences were synchronized enough that BACKWARD was sufficient — the decision record flags the trigger for upgrading to FULL: when any consumer team develops an independent release cycle longer than the producer team's hotfix window); why the consumer framework drops unmatched version envelope messages at INFO level instead of routing them to a DLQ (the original design assumed all handlers would be updated within one sprint of a schema version bump — the decision record specifies the monitoring commitment that makes this assumption safe: a last-processed-timestamp alert per handler per event type that fires within 2× the expected message interval); and why a topic uses NONE compatibility mode (the founding engineer intended to implement a migration window but deferred it — the decision record specifies the migration plan that must be executed to restore enforcement, with a time-bound deadline).