No description
Find a file
2012-01-22 23:24:41 +00:00
autodoc@025c62f6f5 first commit 2012-01-22 23:01:36 +00:00
src/clj_kafka first commit 2012-01-22 23:01:36 +00:00
test/clj_kafka/test first commit 2012-01-22 23:01:36 +00:00
.gitignore first commit 2012-01-22 23:01:36 +00:00
project.clj first commit 2012-01-22 23:01:36 +00:00
README.md clojure syntax readme 2012-01-22 23:24:41 +00:00

clj-kafka

Simple Clojure interface to Kafka.

Usage

clj-kafka currently only supports consuming Kafka data against Kafka 0.7 and using the SimpleConsumer. Future versions may also include support for the ZookeeperConsumer (which tracks offsets and brokers using Zookeeper) and support for producing messages.

SimpleConsumer

user> (def c (create-consumer "localhost" 9092))
user> (def f (fetch "test" 0 0 4096))

user> (messages c f)
({:message {:crc 1513777821, :payload #<byte[] [B@3088890d>, :size 1089}, :offset 1093} {:message {:crc 4119364266, :payload #<byte[] [B@3088890d>, :size 968}, :offset 2065} {:message {:crc 3827222527, :payload #<byte[] [B@3088890d>, :size 1137}, :offset 3206})

License

Copyright © 2012 Paul Ingles

Distributed under the Eclipse Public License, the same as Clojure.