Enable Apache Kafka® Schema registry

DoubleCloud Managed Service for Apache Kafka® features a built-in Managed Schema Registry data format schema registry. The registry is deployed on each cluster's broker host and is accessible via HTTPS on port 443.

We support the following data schema formats:

Note

After you activate the schema registry in your cluster, you can't turn it off.

  1. Go to the Clusters page in the console.

  2. Select the cluster for which you want to enable Schema registry.

  3. Click Edit in the upper-right corner of the page.

  4. Under Advanced, check the Schema registry box.

To enable the schema registry, use the schema_registry_config object within the ClusterService Update method.

The following example uses DoubleCloud Python SDK :

import json

# >= 0.8.0
import doublecloud

from doublecloud.kafka.v1.config_pb2 import SchemaRegistryConfig
from doublecloud.kafka.v1.cluster_service_pb2 import UpdateClusterRequest
from doublecloud.kafka.v1.cluster_service_pb2_grpc import ClusterServiceStub

with open('service_account_key.json') as f: # import your Service account key
  key_data = json.load(f)

sdk = doublecloud.SDK(service_account_key=key_data)
cluster_service = sdk.client(ClusterServiceStub)
update_operation = cluster_service.Update(UpdateClusterRequest(
  cluster_id="<your_clusterID>", 
  schema_registry_config=SchemaRegistryConfig(enabled=True)) # enable schema registry for the above cluster
)

print(update_operation)

See also