Java Shell HTML Batchfile
Switch branches/tags
v5.1.0-beta201806200051 v5.1.0-beta201806191956 v5.1.0-beta39 v5.1.0-beta38 v5.1.0-beta37 v5.1.0-beta36 v5.1.0-beta35 v5.1.0-beta34 v5.1.0-beta180718203536 v5.1.0-beta180707004950 v5.1.0-beta180706202701 v5.1.0-beta180703024529 v5.1.0-beta180702220040 v5.1.0-beta180702214311 v5.1.0-beta180702063440 v5.1.0-beta180702063039 v5.1.0-beta180701175749 v5.1.0-beta180701010040 v5.1.0-beta180630224439 v5.1.0-beta180628184841 v5.1.0-beta180628064520 v5.1.0-beta180627203509 v5.1.0-beta180626014959 v5.1.0-beta180622181348 v5.1.0-beta180620183559 v5.1.0-beta180620180739 v5.1.0-beta180620180431 v5.1.0-beta180619025141 v5.1.0-beta180618225004 v5.1.0-beta180618223247 v5.1.0-beta180618214711 v5.1.0-beta180618191747 v5.1.0-beta180615005408 v5.1.0-beta180614233101 v5.1.0-beta180613013021 v5.1.0-beta180612224009 v5.1.0-beta180612043613 v5.1.0-beta180611231144 v5.0.0-rc1 v5.0.0-beta33 v5.0.0-beta32 v5.0.0-beta31 v5.0.0-beta30 v5.0.0-beta29 v5.0.0-beta28 v5.0.0-beta27 v5.0.0-beta26 v5.0.0-beta25 v5.0.0-beta24 v5.0.0-beta23 v5.0.0-beta22 v5.0.0-beta21 v5.0.0-beta20 v5.0.0-beta19 v5.0.0-beta18 v5.0.0-beta17 v5.0.0-beta16 v5.0.0-beta15 v5.0.0-beta14 v5.0.0-beta12 v5.0.0-beta11 v5.0.0-beta10 v5.0.0-beta9 v5.0.0-beta8 v5.0.0-beta7 v5.0.0-beta6 v5.0.0-beta5 v5.0.0-beta3 v5.0.0-beta2 v5.0.0-beta1 v5.0.0-beta180718203558 v5.0.0-beta180707072142 v5.0.0-beta180707005130 v5.0.0-beta180706202823 v5.0.0-beta180702222458 v5.0.0-beta180702185100 v5.0.0-beta180701205239 v5.0.0-beta180701175910 v5.0.0-beta180701053749 v5.0.0-beta180701010229 v5.0.0-beta180630224559 v5.0.0-beta180629053850 v5.0.0-beta180628221539 v5.0.0-beta180628184550 v5.0.0-beta180627203620 v5.0.0-beta180626015140 v5.0.0-beta180622225242 v4.1.2-rc1 v4.1.2-beta3 v4.1.2-beta180719000536 v4.1.1 v4.1.1-rc3 v4.1.1-rc2 v4.1.1-rc1 v4.1.0 v4.1.0-rc4 v4.1.0-rc3 v4.1.0-rc2 v4.1.0-rc1 v4.0.2
Nothing to show
Clone or download
Latest commit 72c3ac2 Jul 18, 2018
Permalink
Failed to load latest commit information.
avro-console-scripts Bump Confluent to 5.1.0-SNAPSHOT, Kafka to 2.1.0-SNAPSHOT Jun 6, 2018
avro-converter Merge branch '5.0.x' Jun 29, 2018
avro-serde Bump Confluent to 5.1.0-SNAPSHOT, Kafka to 2.1.0-SNAPSHOT Jun 6, 2018
avro-serializer Merge branch '5.0.x' Jun 29, 2018
bin Improve GC options (#792) Apr 27, 2018
checkstyle Remove old checkstyle file Sep 16, 2017
client Merge branch '5.0.x' Jun 29, 2018
config DOCS-458: Using ZK or Kafka for master election (#824) Jun 8, 2018
core Merge branch '5.0.x' Jul 6, 2018
debian Add WantedBy dependency to ensure startup order Mar 8, 2018
docs Merge branch '5.0.x' Jun 29, 2018
json-serializer Bump Confluent to 5.1.0-SNAPSHOT, Kafka to 2.1.0-SNAPSHOT Jun 6, 2018
licenses Moving licenses and notices to a new format, generated by an internal… Aug 16, 2016
maven-plugin Bump Confluent to 5.1.0-SNAPSHOT, Kafka to 2.1.0-SNAPSHOT Jun 6, 2018
notices Moving licenses and notices to a new format, generated by an internal… Aug 16, 2016
package-kafka-serde-tools Bump Confluent to 5.1.0-SNAPSHOT, Kafka to 2.1.0-SNAPSHOT Jun 6, 2018
package-schema-registry Bump Confluent to 5.1.0-SNAPSHOT, Kafka to 2.1.0-SNAPSHOT Jun 6, 2018
schema-registry-console-scripts Bump Confluent to 5.1.0-SNAPSHOT, Kafka to 2.1.0-SNAPSHOT Jun 6, 2018
.gitignore Merge remote-tracking branch 'origin/3.0.x' Jul 8, 2016
Jenkinsfile Update Slack Channel subscription on pre-master branches (#802) May 11, 2018
LICENSE Initial commit Dec 9, 2014
README.md Fix minor typos Feb 6, 2018
generate-licenses-readme.txt Adding a readme to explain how licenses and notices are created. Aug 18, 2016
licenses-and-notices.html Bump Confluent to 5.1.0-SNAPSHOT, Kafka to 2.1.0-SNAPSHOT Jun 6, 2018
pom.xml Merge branch '5.0.x' Jun 29, 2018
version.txt CP-140: add version.txt to share/doc (#356) Jun 23, 2016

README.md

Schema Registry

Schema Registry provides a serving layer for your metadata. It provides a RESTful interface for storing and retrieving Avro schemas. It stores a versioned history of all schemas, provides multiple compatibility settings and allows evolution of schemas according to the configured compatibility setting. It provides serializers that plug into Kafka clients that handle schema storage and retrieval for Kafka messages that are sent in the Avro format.

Quickstart

The following assumes you have Kafka and an instance of the Schema Registry running using the default settings.

# Register a new version of a schema under the subject "Kafka-key"
$ curl -X POST -H "Content-Type: application/vnd.schemaregistry.v1+json" \
    --data '{"schema": "{\"type\": \"string\"}"}' \
    http://localhost:8081/subjects/Kafka-key/versions
  {"id":1}

# Register a new version of a schema under the subject "Kafka-value"
$ curl -X POST -H "Content-Type: application/vnd.schemaregistry.v1+json" \
    --data '{"schema": "{\"type\": \"string\"}"}' \
     http://localhost:8081/subjects/Kafka-value/versions
  {"id":1}

# List all subjects
$ curl -X GET http://localhost:8081/subjects
  ["Kafka-value","Kafka-key"]

# List all schema versions registered under the subject "Kafka-value"
$ curl -X GET http://localhost:8081/subjects/Kafka-value/versions
  [1]

# Fetch a schema by globally unique id 1
$ curl -X GET http://localhost:8081/schemas/ids/1
  {"schema":"\"string\""}

# Fetch version 1 of the schema registered under subject "Kafka-value"
$ curl -X GET http://localhost:8081/subjects/Kafka-value/versions/1
  {"subject":"Kafka-value","version":1,"id":1,"schema":"\"string\""}

# Fetch the most recently registered schema under subject "Kafka-value"
$ curl -X GET http://localhost:8081/subjects/Kafka-value/versions/latest
  {"subject":"Kafka-value","version":1,"id":1,"schema":"\"string\""}

# Delete version 3 of the schema registered under subject "Kafka-value"
$ curl -X DELETE http://localhost:8081/subjects/Kafka-value/versions/3
  3

# Delete all versions of the schema registered under subject "Kafka-value"
$ curl -X DELETE http://localhost:8081/subjects/Kafka-value
  [1, 2, 3, 4, 5]

# Check whether a schema has been registered under subject "Kafka-key"
$ curl -X POST -H "Content-Type: application/vnd.schemaregistry.v1+json" \
    --data '{"schema": "{\"type\": \"string\"}"}' \
    http://localhost:8081/subjects/Kafka-key
  {"subject":"Kafka-key","version":1,"id":1,"schema":"\"string\""}

# Test compatibility of a schema with the latest schema under subject "Kafka-value"
$ curl -X POST -H "Content-Type: application/vnd.schemaregistry.v1+json" \
    --data '{"schema": "{\"type\": \"string\"}"}' \
    http://localhost:8081/compatibility/subjects/Kafka-value/versions/latest
  {"is_compatible":true}

# Get top level config
$ curl -X GET http://localhost:8081/config
  {"compatibilityLevel":"BACKWARD"}

# Update compatibility requirements globally
$ curl -X PUT -H "Content-Type: application/vnd.schemaregistry.v1+json" \
    --data '{"compatibility": "NONE"}' \
    http://localhost:8081/config
  {"compatibility":"NONE"}

# Update compatibility requirements under the subject "Kafka-value"
$ curl -X PUT -H "Content-Type: application/vnd.schemaregistry.v1+json" \
    --data '{"compatibility": "BACKWARD"}' \
    http://localhost:8081/config/Kafka-value
  {"compatibility":"BACKWARD"}

Installation

You can download prebuilt versions of the Kafka REST Proxy as part of the Confluent Platform. To install from source, follow the instructions in the Development section.

Deployment

The REST interface to schema registry includes a built-in Jetty server. The wrapper scripts bin/schema-registry-start and bin/schema-registry-stop are the recommended method of starting and stopping the service.

Development

To build a development version, you may need a development versions of common and rest-utils. After installing these, you can build the Schema Registry with Maven.

This project uses the Google Java code style to keep code clean and consistent.

Contribute

License

The project is licensed under the Apache 2 license.