All Projects → azhur → kafka-serde-scala

azhur / kafka-serde-scala

Licence: Apache-2.0 license
Implicitly converts typeclass encoders to kafka Serializer, Deserializer, Serde.

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to kafka-serde-scala

kafka-serialization
Lego bricks to build Apache Kafka serializers and deserializers
Stars: ✭ 122 (+134.62%)
Mutual labels:  serialization, circe, json4s, avro4s
schema-gen
XML Schema code generator outputting Swift, Kotlin and Java
Stars: ✭ 25 (-51.92%)
Mutual labels:  serialization, jackson
serde
🚝 (unmaintained) A framework for defining, serializing, deserializing, and validating data structures
Stars: ✭ 49 (-5.77%)
Mutual labels:  serialization, serde
KafkaStream-CQRS-EventSourcing
Event Sourcing(CQRS) and Materialized views with Kafka Streams
Stars: ✭ 22 (-57.69%)
Mutual labels:  kafka-streams, avro-kafka
kafka-protobuf-serde
Serializer/Deserializer for Kafka to serialize/deserialize Protocol Buffers messages
Stars: ✭ 52 (+0%)
Mutual labels:  serialization, serde
scalapb-circe
Json/Protobuf convertors for ScalaPB use circe
Stars: ✭ 38 (-26.92%)
Mutual labels:  scalapb, circe
skinny-micro
🎤 Micro Web framework to build Servlet applications in Scala, the core part of Skinny Framework 2
Stars: ✭ 57 (+9.62%)
Mutual labels:  jackson, json4s
Jackson Module Kotlin
Module that adds support for serialization/deserialization of Kotlin (http://kotlinlang.org) classes and data classes.
Stars: ✭ 830 (+1496.15%)
Mutual labels:  serialization, jackson
Marshmallow
A lightweight library for converting complex objects to and from simple Python datatypes.
Stars: ✭ 5,857 (+11163.46%)
Mutual labels:  serialization, serde
Msgpack Rust
MessagePack implementation for Rust / msgpack.org[Rust]
Stars: ✭ 561 (+978.85%)
Mutual labels:  serialization, serde
moonwlker
Jackson JSON without annotation.
Stars: ✭ 14 (-73.08%)
Mutual labels:  serialization, jackson
avro-serde-php
Avro Serialisation/Deserialisation (SerDe) library for PHP 7.3+ & 8.0 with a Symfony Serializer integration
Stars: ✭ 43 (-17.31%)
Mutual labels:  serialization, serde
Typical
Typical: Fast, simple, & correct data-validation using Python 3 typing.
Stars: ✭ 111 (+113.46%)
Mutual labels:  serialization, serde
har-rs
A HTTP Archive format (HAR) serialization & deserialization library, written in Rust.
Stars: ✭ 25 (-51.92%)
Mutual labels:  serialization, serde
elastic-crud
Simple yet elegant ElasticSearch Crud Repository.
Stars: ✭ 46 (-11.54%)
Mutual labels:  jackson
veriform
Security-oriented protobuf-like serialization format with "Merkleized" content hashing support
Stars: ✭ 114 (+119.23%)
Mutual labels:  serialization
edap
No description or website provided.
Stars: ✭ 22 (-57.69%)
Mutual labels:  serialization
surge
Simple, specialised, and efficient binary marshaling
Stars: ✭ 36 (-30.77%)
Mutual labels:  serialization
json5
Header only JSON/JSON5 parser and serializer for C++
Stars: ✭ 22 (-57.69%)
Mutual labels:  serialization
jackson-json-reference
JSON Reference for Java with Jackson.
Stars: ✭ 21 (-59.62%)
Mutual labels:  jackson

kafka-serde-scala

Join the chat at https://gitter.im/azhur/kafka-serde-scala Build Status

kafka-serde-scala provides implicit conversions from different type class Encoder/Decoder to kafka Serializer, Deserializer, Serde.

Following target libraries are supported:

Inspired by https://github.com/hseeberger/akka-http-json.

Installation

Maven Central

Add dependencies for the selected integration:

  • for avro4s:
libraryDependencies ++= List(
  "io.github.azhur" %% "kafka-serde-avro4s" % version,
)
  • for circe:
libraryDependencies ++= List(
  "io.github.azhur" %% "kafka-serde-circe" % version,
)
  • for jackson:
libraryDependencies ++= List(
  "io.github.azhur" %% "kafka-serde-jackson" % version,
)
  • for json4s:
libraryDependencies ++= List(
  "io.github.azhur" %% "kafka-serde-json4s" % version,
)
  • for jsoniter-scala:
libraryDependencies ++= List(
  "io.github.azhur" %% "kafka-serde-jsoniter-scala" % version,
  "com.github.plokhotnyuk.jsoniter-scala" %% "jsoniter-scala-macros" % jsoniter_scala_version % Provided // required only in compile-time
)
  • for play-json:
libraryDependencies ++= List(
  "io.github.azhur" %% "kafka-serde-play-json" % version
)
  • for upickle:
libraryDependencies ++= List(
  "io.github.azhur" %% "kafka-serde-upickle" % version
)
  • for scalapb:
libraryDependencies ++= List(
  "io.github.azhur" %% "kafka-serde-scalapb" % version
)

Usage

Mix xxxSupport into your code which requires implicit Kafka Serde, Serializer or Deserializer, where xxx is the target library used for serialization, i.e: CirceSupport.

Provide your implicit type class instances and the magic will convert them to Kafka serializers:

  • for avro4s: com.sksamuel.avro4s.SchemaFor[T], com.sksamuel.avro4s.ToRecord[T], com.sksamuel.avro4s.FromRecord[T]
  • for circe: io.circe.Encoder[T], io.circe.Decoder[T]
  • for jackson json: com.fasterxml.jackson.databind.ObjectMapper
  • for jackson binary: com.fasterxml.jackson.databind.ObjectMapper, org.codehaus.jackson.FormatSchema
  • for json4s: org.json4s.DefaultFormats, org.json4s.Serialization
  • for jsoniter-scala: com.github.plokhotnyuk.jsoniter_scala.core.JsonValueCodec[T], (and optionally com.github.plokhotnyuk.jsoniter_scala.core.WriterConfig or/and com.github.plokhotnyuk.jsoniter_scala.core.ReaderConfig)
  • for play-json: play.api.libs.json.Reads, play.api.libs.json.Writes
  • for upickle: upickle.default.Reader, upickle.default.Writer
  • for scalapb: scalapb.GeneratedMessageCompanion

For more info, please, take a look at unit tests and at kafka-serde-scala-example which is a kafka-streams (2.x) application with kafka-serde-scala usage.

Contribution

Feel free to contribute with creating PR or opening issues.

License

This code is open source software licensed under the Apache 2.0 License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].