Connections
K2K Kafka and Schema Registry connection details
K2K uses configurable Kafka Consumers, Producers, Admin Clients and Schema Registry Clients to provide seamless Kafka-to-Kafka replication. This section details the source cluster connection, the target cluster connection.
Configuration Parameters
K2K provides both the flexibility to individually configure each module (Consumers, Producers, Admin Clients and Schema Registry Clients) as well as the ability to provide common configuration only once. To achieve this, under source.kafka and target.kafka have a common key which allows settings to be specified for all Consumers, Producers (if applicable) and Admin Clients for those clients.
The full list of available configuration keys is listed in the table bellow.
source.kafka.common
A set of properties that will be inherited by source.kafka.consumer and source.kafka.admin
It's advisable to define "bootstrap.servers" and any other common properties here to avoid repetition.
source.kafka.consumer
Allows any standard Apache Kafka Consumer property to be provided. It will inherit all properties provided in source.kafka.common
If not defined under common , the following properties must be provided:
"group.id""bootstrap.servers"
source.kafka.admin
Allows any standard Apache Kafka Admin Client property to be provided. It will inherit all properties from source.kafka.common .
If not defined in common, the following property must be provided:
"bootstrap.servers"
source.registry.config
Specify any Confluent Schema Registry compatible property.
When Schema Mapping is enabled, the following property must be provided
"schema.registry.url"
source.registry.headers
Any HTTP headers that should be added to all requests made to the Schema Registry Server.
No
target.kafka.common
A set of properties that will be inherited by target.kafka.consumer and taget.kafka.admin
It's advisable to define "bootstrap.servers" and any other common properties here to avoid repetition.
target.kafka.producer
Allows any standard Apache Kafka Producer property to be provided. It will inherit all properties provided in target.kafka.common
If not defined in common, the following property must be provided:
"bootstrap.servers"
target.kafka.consumer
Allows any standard Apache Kafka Producer property to be provided. It will inherit all properties provided in target.kafka.common
If not defined in common, the following property must be provided:
"bootstrap.servers"
target.kafka.admin
Allows any standard Apache Kafka Admin Client property to be provided. It will inherit all properties from target.kafka.common .
If not defined in common, the following property must be provided:
"bootstrap.servers"
target.registry.config
Specify any standard Confluent Schema Registry property.
When Schema Mapping is enabled, the following property must be provided
"schema.registry.url"
target.registry.headers
Any HTTP headers that should be added to all requests made to the Schema Registry Server.
No
Connection Types
Below is a list of connection settings for configuring your application. The examples include both target and source settings to ensure completeness. Since different Kafka providers may supply target and source clusters, adapt the application configuration accordingly.
Confluent Cloud
AWS MSK
Google Managed Kafka
When replicating to a Google Managed Kafka with automatic topic creation enabled, ensure this setting is included. This prevents errors due to Google Managed Kafka's restriction on changing default topic settings. The Kafka Admin Client does not clearly indicate the topic setting policy when it responds to topic configuration changes, and it leads to the application failing and stopping.
SSL
Plain Text
Example
The following example demonstrates how these properties are structured in the configuration file. This single block shows the required settings, an optional Schema Registry connection, and custom consumer properties for performance tuning.
Last updated
Was this helpful?

