Schema Registry connectivity and authentication
Source and target Schema Registry connections.
Records serialized with Avro, Protobuf, or JSON Schema depend on subjects registered in Schema Registry. Consumers on the target Kafka cluster cannot deserialize replicated data unless K2K can reach both registries—therefore we configure source.registry and target.registry when schema migration is enabled.
Schema Registry is optional. Skip this guide if your pipeline replicates data that does not use Schema Registry. When registry access is required, each side needs its own URL and credentials. K2K passes standard Schema Registry client properties through registry.config, prefixed with schema.registry.
Prerequisites
Kafka connectivity and authentication configured
Schema Registry endpoints for the source Kafka cluster and target Kafka cluster (when schema migration or schema-aware replication is required)
Example
Use this pipeline configuration:
name: "my_pipeline"
source:
kafka:
common:
"bootstrap.servers": "source:9092"
registry:
config:
"schema.registry.url": "https://source-sr:8081"
"schema.registry.basic.auth.credentials.source": "USER_INFO"
"schema.registry.basic.auth.user.info": "user:password"
target:
kafka:
common:
"bootstrap.servers": "target:9092"
registry:
config:
"schema.registry.url": "https://target-sr:8081"
replication:
- source:
topic: "orders.*"
- sink:
topic: source
partition: sourceConfiguration keys
Source
source.registry
Source Schema Registry connection
Conditional
(none)
Replicator
source.registry.config
Schema Registry client properties
Conditional
{}
Replicator
Target
target.registry
Target Schema Registry connection
Conditional
(none)
Replicator
target.registry.config
Schema Registry client properties
Conditional
{}
Replicator
source.registry and target.registry are required when schema migration is enabled.
Client properties
Any standard Schema Registry client property can be set under registry.config, prefixed with schema.registry (for example schema.registry.url). For the full property list, see the Schema Registry client configuration reference.
Commonly used keys:
schema.registry.url
Schema Registry URL
schema.registry.basic.auth.credentials.source
Basic auth source (USER_INFO, SASL_INHERIT, etc.)
schema.registry.basic.auth.user.info
Credentials as user:password
schema.registry.ssl.truststore.location
Truststore path for TLS
schema.registry.ssl.truststore.password
Truststore password
For secrets in connection settings, see Secrets and templates.
Advanced
Schema Registry headers
Add custom HTTP headers to Schema Registry requests. Useful when a proxy or gateway requires additional headers.
source.registry.headers
HTTP headers added to source Schema Registry requests
No
{}
Replicator
target.registry.headers
HTTP headers added to target Schema Registry requests
No
{}
Replicator
Last updated
Was this helpful?

