@qualithm/kafka-client - v0.1.6
    Preparing search index...

    Class SchemaRegistry

    Confluent Schema Registry client.

    Provides methods for registering and fetching schemas. Caches schemas by ID and by subject to minimise HTTP round-trips.

    const registry = new SchemaRegistry({ url: "http://localhost:8081" })
    const { id } = await registry.register("my-topic-value", '{"type":"record",...}', "AVRO")
    const schema = await registry.getSchema(id)
    Index

    Constructors

    Methods

    • List all subjects in the registry.

      Returns Promise<readonly string[]>

      Array of subject names.

    • Register a schema under a subject.

      If the schema already exists, the existing ID is returned.

      Parameters

      • subject: string

        Subject name (e.g. "my-topic-value").

      • schema: string

        Schema definition string.

      • schemaType: SchemaType = "AVRO"

        Schema type (default: "AVRO").

      Returns Promise<{ id: number }>

      The global schema ID.