Home

Awesome

Circe-Kafka

Build Status Maven Central

Implicitly turn your Encoder and Decoder instances into Serializer, Deserializer and Serde.

Artifact

circe-kafka is cross-compiled against Scala 2.12 and 2.13.

libraryDependencies ++= "com.nequissimus" %% "circe-kafka" % "2.7.0"

Note that this library attempts to match the Kafka version.

Usage

import io.circe.{ Decoder, Encoder }
import org.apache.kafka.common.serialization.{ Deserializer, Serde, Serializer }

final case class Foo(i: Int)

//

import nequi.circe.kafka._

implicit val encoder: Encoder[Foo] = ... // for example by importing io.circe.generic.auto._
implicit val decoder: Decoder[Foo] = ...

val serializer: Serializer[Foo] = implicitly
val deserializer: Deserializer[Foo] = implicitly
val serde: Serde[Foo] = implicitly