Confluent Schema Registry

  1. Connecting
    1. CLI
    2. Environment Variables
    3. Python API
  2. Format
    1. URLs
    2. Paths
  3. Type Conversion
  4. Limitations and Constraints

Connecting

CLI

recap add my_csr http+csr://my-registry:8081

Environment Variables

export RECAP_SYSTEM__MY_CSR=http+csr://my-registry:8081

Python API

from recap.clients import create_client

with create_client("http+csr://my-registry:8081") as client:
    client.ls()

Format

URLs

Recap’s Confluent Schema Registry client takes a URL pointing to the Confluent Schema Registry HTTP server.

The scheme must be http+csr or https+csr. The +csr suffix is required to distinguish this client from other clients that also use HTTP connections (similar to SQLAlchemy’s dialect+driver format)

Paths

Recap’s Confluent Schema Registry paths are formatted as:

[system]/[topic]

You may optionally include -key or -value at the end of the path to specify the key or value schema, respectively. If no suffix is supplied -value is assumed.

Type Conversion

ConfluentRegistryClient.get_schema() uses the AvroConverter, JSONSchemaConverter, and ProtobufConverter classes to convert schemas, based on their type.

Please see the individual documentation for these classes for information on how they convert types:

Limitations and Constraints

  1. ConfluentRegistryClient does not support schema references.

The conversion functions raise a ValueError exception if the conversion is not possible.