nequissimus / circe-kafka

Implicit conversion of Encoder and Decoder into Serializer/Deserializer/Serde



Build Status Maven Central

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


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

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

Note that this library attempts to match the Kafka version.


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
implicit val decoder: Decoder[Foo] = ...

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