azhur / kafka-serde-scala

Implicitly converts typeclass encoders to kafka Serializer, Deserializer, Serde.
https://github.com/azhur/kafka-serde-scala
Apache License 2.0
57 stars 9 forks source link
avro avro-kafka avro4s circe deserialize jackson json json4s jsoniter-scala kafka kafka-serde-scala kafka-serializers kafka-streams protobuf-kafka scala scalapb serde serialization upickle zio-json

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:

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 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.