Package io.deephaven.kafka.protobuf
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:
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
The fully-qualified protobufMessage
name, for example "com.example.MyMessage".abstract String
subject()
The schema subject to fetch from the schema registry.abstract OptionalInt
version()
The schema version to fetch from the schema registry.
-
Constructor Details
-
DescriptorSchemaRegistry
public DescriptorSchemaRegistry()
-
-
Method Details
-
builder
-
subject
The schema subject to fetch from the schema registry.- Returns:
- the schema subject
-
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
The fully-qualified protobufMessage
name, for example "com.example.MyMessage". This message'sDescriptors.Descriptor
will be used as the basis for the resulting table'sdefinition
. 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
-