Kafka Registryless Avro Serdes

A Serdes for serializing / deserializing Avro records without a schema registry

Лицензия

Лицензия

Группа

Группа

com.mitchseymour
Идентификатор

Идентификатор

kafka-registryless-avro-serdes
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

pom.sha512
Описание

Описание

Kafka Registryless Avro Serdes
A Serdes for serializing / deserializing Avro records without a schema registry
Ссылка на сайт

Ссылка на сайт

https://github.com/mitch-seymour/kafka-registryless-avro-serdes
Система контроля версий

Система контроля версий

https://github.com/mitch-seymour/kafka-registryless-avro-serdes

Скачать kafka-registryless-avro-serdes

Зависимости

runtime (2)

Идентификатор библиотеки Тип Версия
org.apache.avro : avro jar 1.8.2
joda-time : joda-time jar 2.10.1

Модули Проекта

Данный проект не имеет модулей.

Kafka Registryless Avro Serdes

Maven Central

If you want to use Avro in your Kafka project, but aren't using Confluent Schema Registry, you can use this Avro Serdes instead. Note that the record schema will be serialized with each message.

Install

dependencies {
  implementation 'com.mitchseymour:kafka-registryless-avro-serdes:0.1.0'
}

Usage

Once you've generated your classes from an Avro schema file, for example, with the gradle-avro-plugin, you can use the AvroSerdes#get method to generate an Avro Serdes for a generated class. For example, if you generated a class named Tweet from the following definition:

{
    "namespace": "com.mitchseymour.model",
    "name": "Tweet",
    "type": "record",
    "fields": [
      {
        "name": "id",
        "type": "long"
      },
      {
        "name": "text",
        "type": "string"
      }
    ]
 }

You could then create an Avro Serde for that class using this code:

Serde<Tweet> serde = AvroSerdes.get(Tweet.class);

The resulting Serde can be used anywhere you would normally use one of Kafka's built-in Serdes. For example, in a Kafka Streams app, you could do this:

stream.to("tweets", Produced.with(Serdes.String(), AvroSerdes.get(Tweet.class)));

Версии библиотеки

Версия
1.0.0
0.1.2
0.1.1
0.1.0