Interface SchemaInfo


public interface SchemaInfo
Describes a schema for broker-side schema negotiation and compatibility checks.
  • Method Details

    • name

      String name()
      The name of the schema.
      Returns:
      the schema name
    • type

      SchemaType type()
      The type of the schema.
      Returns:
      the SchemaType indicating the serialization format
    • schema

      byte[] schema()
      The raw schema definition bytes (e.g., Avro schema JSON, Protobuf descriptor).
      Returns:
      the schema definition as a byte array
    • properties

      Map<String,String> properties()
      Additional properties associated with the schema.
      Returns:
      an unmodifiable map of schema property key-value pairs
    • of

      static SchemaInfo of(String name, SchemaType type, byte[] schema, Map<String,String> properties)
      Build a SchemaInfo from its components. Useful for constructing a generic schema from a raw definition (e.g. an Avro/JSON schema document) via Schema.generic(SchemaInfo).
      Parameters:
      name - the schema name
      type - the schema type
      schema - the raw schema definition bytes (e.g. Avro schema JSON); may be null
      properties - additional schema properties; may be null
      Returns:
      an immutable SchemaInfo