Class SchemaRegistryConfigProvider

java.lang.Object
io.confluent.kafka.schemaregistry.client.config.provider.SchemaRegistryConfigProvider
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.kafka.common.config.provider.ConfigProvider, org.apache.kafka.common.Configurable

public class SchemaRegistryConfigProvider extends Object implements org.apache.kafka.common.config.provider.ConfigProvider
An implementation of ConfigProvider that obtains configs from metadata in schema registry.
  • Constructor Details

    • SchemaRegistryConfigProvider

      public SchemaRegistryConfigProvider()
  • Method Details

    • configure

      public void configure(Map<String,?> configs)
      Specified by:
      configure in interface org.apache.kafka.common.Configurable
    • get

      public org.apache.kafka.common.config.ConfigData get(String path)
      Retrieves the data from schema registry at the given path. The path is of the form contexts/{context}/subjects/{subject}/versions/{version} or subjects/{subject}/versions/{version} or subjects/{subject} (same as using a version of -1 or latest).
      Specified by:
      get in interface org.apache.kafka.common.config.provider.ConfigProvider
      Parameters:
      path - the path where the data resides
      Returns:
      the configuration data
    • get

      public org.apache.kafka.common.config.ConfigData get(String path, Set<String> keys)
      Retrieves the data with the given keys at the given path. The path is of the form contexts/{context}/subjects/{subject}/versions/{version} or subjects/{subject}/versions/{version} or subjects/{subject} (same as using a version of -1 or latest).
      Specified by:
      get in interface org.apache.kafka.common.config.provider.ConfigProvider
      Parameters:
      path - the path where the data resides
      keys - the keys whose values will be retrieved
      Returns:
      the configuration data
    • getData

      public Map<String,String> getData(String path)
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException