Neapolitan Pizza Margherita

    @debitoor/confluent-schema-registry

    3.3.2 • Public • Published

    confluent-schema-registry

    @kafkajs/confluent-schema-registry is a library that makes it easier to interact with the Confluent schema registry, it provides convenient methods to encode, decode and register new schemas using the Apache Avro serialization format and Confluent's wire format.

    Build Status

    Getting started

    npm install @kafkajs/confluent-schema-registry
    # yarn add @kafkajs/confluent-schema-registry
    const { Kafka } = require('kafkajs')
    const { SchemaRegistry } = require('@kafkajs/confluent-schema-registry')
    
    const kafka = new Kafka({ clientId: 'my-app', brokers: ['kafka1:9092'] })
    const registry = new SchemaRegistry({ host: 'http://registry:8081/' })
    const consumer = kafka.consumer({ groupId: 'test-group' })
    
    const run = async () => {
      await consumer.connect()
      await consumer.subscribe({ topic: 'test-topic', fromBeginning: true })
    
      await consumer.run({
        eachMessage: async ({ topic, partition, message }) => {
          const decodedKey = await registry.decode(message.key)
          const decodedValue = await registry.decode(message.value)
          console.log({ decodedKey, decodedValue })
        },
      })
    }
    
    run().catch(console.error)

    Documentation

    Learn more about using KafkaJS Confluent Schema registry on the official site!

    License

    See LICENSE for more details.

    Install

    npm i @debitoor/confluent-schema-registry

    DownloadsWeekly Downloads

    20

    Version

    3.3.2

    License

    none

    Unpacked Size

    221 kB

    Total Files

    110

    Last publish

    Collaborators

    • talar.boyadjian
    • sumup-yonatankarp
    • dzmitry.h.sumup
    • mmahrous
    • jmrigali
    • maciej-kusnierz
    • mariusrosand
    • skryvytskyi_sumup
    • oalpatov
    • bgeraymovich
    • bifrost
    • debitoor-bot
    • mamant
    • hilleer
    • s0ph1e
    • sumup.vascofg
    • jonathanmh
    • igor_torba
    • plafytskyi
    • igor.g
    • ituraj
    • eugene-ltv-debitoor
    • lshilo
    • hamoudaarfaoui
    • ziegelke
    • soulmonk
    • ketevanl
    • andriyonyshchenko
    • belrestro
    • robinmetral
    • connor_baer
    • balexandre
    • belem-acosta
    • mickael-h
    • annewarnk1
    • felixjung
    • oarostovtseva
    • amelako
    • mcntsh
    • msafwat-sumup
    • ketansumup
    • zetxek