Class RestBackedSchemaRegistryClient

java.lang.Object
io.confluent.kafka.schemaregistry.validator.AbstractSchemaRegistryClient
io.confluent.kafka.schemaregistry.validator.RestBackedSchemaRegistryClient
All Implemented Interfaces:
io.confluent.kafka.schemaregistry.client.SchemaRegistryClient, io.confluent.kafka.schemaregistry.client.SchemaVersionFetcher, Closeable, AutoCloseable
Direct Known Subclasses:
LruSchemaRegistryClient

public abstract class RestBackedSchemaRegistryClient extends AbstractSchemaRegistryClient
The parts of a Schema Registry client that are independent of how results are cached: the RestService and its construction-time wiring, retry handling, schema-provider setup and parsing, and the calls that pass straight through to Schema Registry.

Subclasses layer their own lookup strategy on top. LruSchemaRegistryClient adds Caffeine caches for the broker-side validator; Kora Edge's mTLS client is a sibling rather than a subclass of it, so the two cannot drift apart in the parts they genuinely share.

The one construction step that differs between them is where the SSLSocketFactory comes from. It is supplied by the subclass as a constructor argument rather than derived here — see sslSocketFactoryFromConfigs(Map).

  • Method Details

    • parseSchema

      public Optional<io.confluent.kafka.schemaregistry.ParsedSchema> parseSchema(String schemaType, String schemaString, List<io.confluent.kafka.schemaregistry.client.rest.entities.SchemaReference> references)
    • parseSchema

      public Optional<io.confluent.kafka.schemaregistry.ParsedSchema> parseSchema(io.confluent.kafka.schemaregistry.client.rest.entities.Schema schema)
    • getByVersion

      public io.confluent.kafka.schemaregistry.client.rest.entities.Schema getByVersion(String subject, int version, boolean lookupDeletedSchema)
    • getIdWithResponse

      public io.confluent.kafka.schemaregistry.client.rest.entities.requests.RegisterSchemaResponse getIdWithResponse(String subject, io.confluent.kafka.schemaregistry.ParsedSchema schema, boolean normalize) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
      Throws:
      IOException
      io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
    • getAssociationsByResourceName

      public List<io.confluent.kafka.schemaregistry.client.rest.entities.Association> getAssociationsByResourceName(String resourceName, String resourceNamespace, String resourceType, List<String> associationTypes, String lifecycle, int offset, int limit) throws IOException, io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
      Throws:
      IOException
      io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException
    • close

      public void close() throws IOException
      Throws:
      IOException