Scala wrapper for kafka-clients v2.7.1
-
Makes it easy to use your effect monad with help of cats-effect
-
Blocking calls are being executed on provided
ExecutionContext
. -
Simple
case class
based configuration -
Support of typesafe config
val producer = Producer.of[IO](config, ecBlocking)
val metadata: IO[RecordMetadata] = producer.use { producer =>
val record = ProducerRecord(topic = "topic", key = "key", value = "value")
producer.send(record).flatten
}
val consumer = Consumer.of[IO, String, String](config, ecBlocking)
val records: IO[ConsumerRecords[String, String]] = consumer.use { consumer =>
for {
_ <- consumer.subscribe(Nel("topic"), None)
records <- consumer.poll(100.millis)
} yield records
}
addSbtPlugin("com.evolution" % "sbt-artifactory-plugin" % "0.0.2")
libraryDependencies += "com.evolutiongaming" %% "skafka" % "11.5.0"