Class DescriptorSchemaRegistry

java.lang.Object
io.deephaven.kafka.protobuf.DescriptorSchemaRegistry
All Implemented Interfaces:
DescriptorProvider

@Immutable public abstract class DescriptorSchemaRegistry extends Object implements DescriptorProvider
A descriptor provider sourced from a Kafka schema registry.
See Also:
  • Constructor Details

    • DescriptorSchemaRegistry

      public DescriptorSchemaRegistry()
  • Method Details

    • builder

      public static DescriptorSchemaRegistry.Builder builder()
    • subject

      public abstract String subject()
      The schema subject to fetch from the schema registry.
      Returns:
      the schema subject
    • version

      public abstract OptionalInt version()
      The schema version to fetch from the schema registry. When not set, the latest schema will be fetched.

      For purposes of reproducibility across restarts where schema changes may occur, it is advisable for callers to set this. This will ensure the resulting table definition will not change across restarts. This gives the caller an explicit opportunity to update any downstream consumers before bumping schema versions.

      Returns:
      the schema version, or none for latest
    • messageName

      public abstract Optional<String> messageName()
      The fully-qualified protobuf Message name, for example "com.example.MyMessage". This message's Descriptors.Descriptor will be used as the basis for the resulting table's definition. When not set, the first message descriptor in the protobuf schema will be used.

      It is advisable for callers to explicitly set this.

      Returns:
      the schema message name