Skip to content

Latest commit

 

History

History
69 lines (51 loc) · 3.16 KB

File metadata and controls

69 lines (51 loc) · 3.16 KB

Quick Start with Schema Registry

This folder contains a variant of the Quick Start SSL app configured to use the Confluent Schema Registry.

The docker-compose.yml file has been revised to configure the integration with Confluent Docker Image for Schema Registry as follows:

  • New schema-registry service, pulled from the mentioned Docker image and configured with security settings.

  • kafka-connector

    Adaption of adapters.xml to include:

    • Enabling of the Schema Registry:

      <param name="value.evaluator.schema.registry.enable">true</param>
    • Configuration of the target Schema Registry URL:

      <param name="schema.registry.url">https://schema-registry:8084</param>
    • Configuration of the truststore to authenticate the Schema Registry.

      <param name="schema.registry.encryption.truststore.path">secrets/kafka-connector.truststore.jks</param>
      <param name="schema.registry.encryption.truststore.password">kafka-connector-truststore-password</param>
    • Configuration of the keystore for client authentication with the Schema Registry.

      <param name="schema.registry.encryption.keystore.enable">true</param>
      <param name="schema.registry.encryption.keystore.path">secrets/kafka-connector.keystore.jks</param>
      <param name="schema.registry.encryption.keystore.password">kafka-connector-password</param>
      <param name="schema.registry.encryption.keystore.key.password">kafka-connector-password</param>
  • producer

    Extension of the producer.properties configuration file with the settings required to communicate with the Schema Registry:

    ...
    # JSON deserializer with support for the Schema Registry
    value.serializer=io.confluent.kafka.serializers.json.KafkaJsonSchemaSerializer
    # Schema Registry URL
    schema.registry.url=https://schema-registry:8084
    # Truststore configuration to authenticate the Schema Registry
    schema.registry.ssl.truststore.location=/usr/app/secrets/producer.truststore.jks
    schema.registry.ssl.truststore.password=producer-truststore-password
    # Keystore configuration for client authentication with the Schema Registry
    schema.registry.ssl.keystore.location=/usr/app/secrets/producer.keystore.jks
    schema.registry.ssl.keystore.password=producer-password
    schema.registry.ssl.key.password=producer-password

In addition, the schema-registry service references the local secrets/schema-registry folder to retrieve its secrets:

You can regenerate all of them with:

./generate-secrets.sh

Run

From this directory, follow the same instructions you can find in the Quick Start section of the main README file.