4.0

Schema Registries

If using a schema registry and AVRO serialization format with Apache Kafka, provide a list of all schema registries endpoints. The protocol , http:// or https://, is required as well.

Lenses is compatible with Schema Registries implementing Confluent’s Schema Registry APIs. Lenses also supports Cloudera/Hortonworks Schema registry; to enable it set the following:

lenses.schema.registry.mode = HORTONWORKS

The URL for Hortonworks schema registry needs to include the /api/v1 suffix.

To control the schemas backing Kafka topic and if schemas can be deleted configure:

# Enable schema deletion - default : false
lenses.schema.registry.delete = true       
# Kafka topic that stores the state of the Schema Registry
lenses.schema.registry.topics = "_schemas" 

lenses.schema.registry.urls = [
  { url: "http://SR_HOST_1:8081" },
  { url: "http://SR_HOST_2:8081" }
]
lenses.schema.registry.urls = [
  {
    url: "http://SR_HOST_1:8081",
    metrics: {            # Optional section
       type: "JMX",       # One of 'JMX', 'JOLOKIAP' (POST), 'JOLOKIAG' (GET)
       url: "SR_HOST_1:9583" # No protocol here. Just the JMX host:port
    }
  },
  {
    url: "http://SR_HOST_2:8081",
     metrics: {           # Optional section
       type: "JMX",       # One of 'JMX', 'JOLOKIAP' (POST), 'JOLOKIAG' (GET)
       url: "SR_HOST_2:9583"
     }
  }
]
lenses.schema.registry.urls = [
  {
    url: "http://SR_HOST_1:8081",
    metrics: {            # Optional section
       ssl: true,         # Optional, please make the remote JMX/HTTP
                          # certificate is accepted by the Lenses truststore
       user: "admin",     # Optional, the remote JMX/HTTP user
       password: "admin", # Optional, the remote JMX/HTTP password
       type: "JMX",       # One of 'JMX', 'JOLOKIAP' (POST), 'JOLOKIAG' (GET)
       url: "SR_HOST_1:9583"
    }
  },
  {
    url: "http://SR_HOST_2:8081",
     metrics: {           # Optional section
       ssl: true,         # Optional, please make the remote JMX/HTTP
                          # certificate is accepted by the Lenses truststore
       user: "admin",     # Optional, the remote JMX/HTTP user
       password: "admin", # Optional, the remote JMX/HTTP password
       type: "JMX",       # One of 'JMX', 'JOLOKIAP' (POST), 'JOLOKIAG' (GET)
       url: "SR_HOST_2:9583"
     }
  }
]

For basic authentication with the Schema registry, add the bellow settings:

lenses.schema.registry.auth = "USER_INFO"
lenses.schema.registry.username = "USERNAME"
lenses.schema.registry.password = "PASSWORD"

lenses.kafka.settings.client.basic.auth.credentials.source = USER_INFO
lenses.kafka.settings.client.basic.auth.user.info = "USERNAME:PASSWORD"

The registry is an optional service for Aiven. When enabled, it is protected by Basic HTTP Authentication. To setup Lenses with it, add the following section to your lenses.conf, adjusting the URL and authentication fields.

It is important to keep the scheme (https) and not add the username and password to the schema registry URL . The username and password can be found in the Aiven control panel.

lenses.schema.registry.urls = [{url:"https://[CLUSTER-NAME]-[PROJECT-NAME].aivencloud.com:[PORT]"}]

lenses.schema.registry.auth = "USER_INFO"
lenses.schema.registry.username = "[USERNAME]"
lenses.schema.registry.password = "[PASSWORD]"

lenses.kafka.settings.client.basic.auth.credentials.source = "USER_INFO"
lenses.kafka.settings.client.basic.auth.user.info = "[USERNAME]:[PASSWORD]"

See configuration settings.