Schema Registry
Confluent-compatible HTTP client for Avro, Protobuf, and JSON-Schema payload decoding.
The schema_registry feature pulls schemas from a Confluent-compatible registry so Krishiv can decode bytes payloads into typed RecordBatches. The registry client is also exported for use in custom UDFs.
Configuration
| Variable | Purpose |
|---|---|
KRISHIV_AVRO_REGISTRY_URL | Registry base URL, e.g. http://schema-registry:8081. |
KRISHIV_PROTO_REGISTRY_URL | Same for Protobuf schemas. |
KRISHIV_JSON_REGISTRY_URL | Same for JSON-Schema (used in json.value decoding). |
Subject naming
For a Kafka topic orders with key/value schemas, the default subjects are orders-key and orders-value. Override per source with the registry.subject.key / registry.subject.value options.
Schema evolution
The connector fetches the schema by id embedded in the message. Compatibility is enforced by the registry, not by Krishiv. A backward-incompatible schema change is rejected by the registry and the source fails to start.
Using the client directly
use krishiv_connectors::schema_registry::SchemaRegistryClient;
let client = SchemaRegistryClient::new("http://schema-registry:8081");
let schema = client.get_latest_schema("orders-value").await?;
let avro = schema.parse_avro()?;
Python
import krishiv as ks
schema = ks.schema_registry_confluent("http://schema-registry:8081", "orders-value")