Reputation: 187
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.
Upvotes: 3
Views: 648
Reputation: 191884
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>)
Upvotes: 3