All Projects → pyr → Kinsky

pyr / Kinsky

Licence: mit
Kafka Clojure client library

Programming Languages

clojure
4091 projects

Kinsky: Clojure Kafka client library

Build Status

Kinsky is a somewhat opinionated client library for Apache Kafka in Clojure.

Kinsky provides the following:

  • Kakfa 0.10.0.x compatibility
  • Adequate data representation of Kafka types.
  • Default serializer and deserializer implementations such as JSON, EDN and a keyword serializer for keys.
  • Documentation

Usage

   [[spootnik/kinsky "0.1.23"]]

Documentation

Contributors

Thanks a lot to these awesome contributors

Changelog

0.1.25

  • Removal of the asynchronous façade, transducers should suffice

0.1.24

  • Add support for producer transaction

0.1.23

  • Fixed ConcurrentModificationException when async consumer created with topic
  • Added support for reader opts when consuming
  • Add timestamp in record output

0.1.22

  • Update to latest Kafka clients
  • Typo fix

0.1.21

  • Update to latest Kafka clients
  • Provide duplex channels to bridge control and record channels in consumers

0.1.16

Examples

The examples assume the following require forms:

(:require [kinsky.client :as client])

Production

(let [p (client/producer {:bootstrap.servers "localhost:9092"}
                         (client/keyword-serializer)
                         (client/edn-serializer))]
  (client/send! p "account" :account-a {:action :login}))

Consumption

(let [c (client/consumer {:bootstrap.servers "localhost:9092"
                          :group.id          "mygroup"}
                         (client/keyword-deserializer)
                         (client/edn-deserializer))]
  (client/subscribe! c "account")
  (client/poll! c 100))

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