3

I am using Confluent managed Kafka cluster and Schema Registry service. I can manage connect confluent cloud kafka cluster adding following properties to producer config (Scala)

security.protocol
ssl.endpoint.identification.algorithm
sasl.mechanism
sasl.jaas.config
org.apache.kafka.common.security.plain.PlainLoginModule

but can't connect to confluent cloud schema registry. confluent cloud schema registry provides key and secret for accessing but I don't know how to set up the key and secret. is there any config setting for accessing confluent cloud schema registry.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
jonyroy
  • 187
  • 1
  • 11

1 Answers1

3

Adding the following properties will solve the problem.

import io.confluent.kafka.schemaregistry.client.SchemaRegistryClientConfig;


properties.put(SchemaRegistryClientConfig.BASIC_AUTH_CREDENTIALS_SOURCE, "USER_INFO")
properties.put(SchemaRegistryClientConfig.USER_INFO_CONFIG, <SCHEMA_REGISTRY_KEY> + ":" + <SCHEMA_REGISTRY_SECRET>)
OneCricketeer
  • 179,855
  • 19
  • 132
  • 245