liveBook · Manning

Schema version

As explained in Kafka Streams in Action, Second Edition

A schema version is an ordered revision number identifying one version of a schema under a Schema Registry subject.

A schema version is an ordered revision number identifying a schema registered under a Schema Registry subject. A subject can expose all versions, one specific version, or its latest version. section 3.2.5

Use the version number to navigate a subject’s registered schemas:

  • List the versions associated with a subject, such as [1]. section 3.2.5
  • Retrieve a specific revision with /subjects/{subject}/versions/{version}. section 3.2.5
  • Retrieve the current latest revision with /subjects/{subject}/versions/latest. section 3.2.5
  • Treat versions as subject-scoped: the same event type can use different schema versions on different topics when TopicRecordNameStrategy is configured. section 3.3.3

Inspecting a registered version

After registering the Avro Avengers schema under avro-avengers-value, request /subjects/avro-avengers-value/versions/1. The response identifies subject, version 1, registry ID 1, and the stored schema. section 3.2.5

Listing 3.8 Getting all versions for a given schema
curl -s "http://localhost:8081/subjects/avro-avengers-value/versions" | jq

View the concrete command and response pattern for listing every version registered under a subject. section 3.2.5

How Kafka Streams in Action, Second Edition covers it

How deep it goes
Explains ordered revisions and REST retrieval, but defers schema compatibility rules and migration procedures.
Examples
Uses an Avro Avengers schema, curl endpoints, version 1, and a CustomerPurchaseEvent across interactions and purchases topics.
What it assumes
Assumes schemas, subjects, and topics; demonstrates Avro, Protobuf, and JSON Schema registration contexts.
What you can do after
Operate/configure Schema Registry by listing, retrieving, and selecting subject-specific schema versions through REST endpoints.
How it connects
Connects schema versions with Schema Registry subjects, topics, schemas, and TopicRecordNameStrategy.

Also explained in

Compare how 2 books explain schema version →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kafka Streams in Action, Second Edition. The section links point to the parts of the book it draws on.