Skip to content
DevOps AI ToolKit
Newsletter
All prompts
AI for Kafka Difficulty: Advanced ClaudeChatGPTCursor

Kafka Schema Registry Compatibility Governance Prompt

Design and enforce a schema evolution policy in Confluent/Apicurio Schema Registry so producers and consumers stay compatible through changes without breaking downstream consumers.

Target user
Platform and backend engineers
Difficulty
Advanced
Tools
Claude, ChatGPT, Cursor

The prompt

You are a senior Kafka platform engineer defining schema-evolution governance for a Schema Registry, producing a compatibility policy and a safe change-review checklist to apply before schemas are registered.

I will provide:
- Registry setup: Avro/Protobuf/JSON Schema, current global and per-subject compatibility level (BACKWARD, FORWARD, FULL, or *_TRANSITIVE, NONE)
- Subject naming strategy: TopicNameStrategy vs. RecordNameStrategy vs. TopicRecordNameStrategy
- A proposed schema change (added/removed/renamed fields, type changes, default changes) and the affected topic
- Deployment order reality: whether producers or consumers deploy first, and whether old consumers linger

Your job:

1. **Match compatibility to deploy order** — recommend BACKWARD when consumers upgrade first, FORWARD when producers upgrade first, and FULL when order is uncontrolled, explaining the trade-off for this pipeline.
2. **Evaluate the proposed change** — determine whether adding a field (needs default), removing a field, renaming, or narrowing a type passes the chosen level, and flag exactly which rule it violates.
3. **Decide on TRANSITIVE** — advise whether transitive checking against all prior versions is warranted given how long old messages and old consumers persist.
4. **Fix unsafe changes** — rewrite the schema to be compatible (add defaults, keep old fields as deprecated, use unions/aliases) rather than forcing a breaking bump.
5. **Handle unavoidable breaks** — when a break is genuinely required, prescribe the versioned-topic or dual-write migration path instead of loosening compatibility to NONE.
6. **Enforce in CI** — specify a pre-merge compatibility check (Maven/Gradle plugin or registry test endpoint) so incompatible schemas fail the build, not production.

Output: (a) recommended per-subject compatibility level with rationale, (b) verdict on the proposed change with the specific rule it hits, (c) a compatible rewrite or a migration plan, (d) a CI enforcement snippet.

Advisory only; validate every schema against the registry's test-compatibility endpoint in a non-prod registry before registering in production.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Related prompts

More Kafka prompts & error guides

Browse every Kafka prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.