|
1 | 1 | = clj-kafka-x |
2 | 2 |
|
3 | | -A Clojure library for the Kafka 0.10.X.X releases. |
4 | | - |
5 | | -This library takes it's inspiration and some code from the https://github.com/pingles/clj-kafka/[clj-kafka] and from the https://github.com/DayoOliyide/kafkian[kafkian] libraries. |
6 | | - |
7 | | -Current code was initially taken from https://github.com/DayoOliyide/kafkian[kafkian], but since Apache Kafka has very ugly backward compatibilities and developing this code goes break the chain -- it was not forked normally, but splitted and refactored to dedicated library with many thanks to previous developers. Secondly (and "sad but truth") - it is too hard to rely on external maintainers for code which you're going to actively develop or, at least, use in your own production. |
8 | | - |
9 | | -NOTE: This library is *NOT* compatible with Kafka Clusters below version 0.10. Use the https://github.com/pingles/clj-kafka/[clj-kafka] for Kafka Clusters version 0.8 and 0.9 and https://github.com/DayoOliyide/kafkian[kafkian] for 0.9 and, may be, 0.10.0.0. It is mainly developed for 0.10.0.1 and 0.10.1.0. |
| 3 | +A Clojure library for the Kafka v1.0.0 release. |
| 4 | + |
| 5 | +This library takes it's inspiration and some code from the |
| 6 | +https://github.com/pingles/clj-kafka/[clj-kafka] |
| 7 | +and from the https://github.com/DayoOliyide/kafkian[kafkian] libraries. |
| 8 | + |
| 9 | +Current code was initially taken from |
| 10 | +https://github.com/DayoOliyide/kafkian[kafkian], but since Apache Kafka |
| 11 | +has very ugly backward compatibilities and developing this code goes |
| 12 | +break the chain -- it was not forked normally, but splitted and |
| 13 | +refactored to dedicated library with many thanks to previous developers. |
| 14 | +Secondly (and "sad but truth") - it is too hard to rely on external |
| 15 | +maintainers for code which you're going to actively develop or, |
| 16 | +at least, use in your own production. |
| 17 | + |
| 18 | +NOTE: This library is *NOT* compatible with Kafka Clusters below version 0.10. |
| 19 | +Use the https://github.com/pingles/clj-kafka/[clj-kafka] for |
| 20 | +Kafka Clusters version 0.8 and 0.9 and |
| 21 | +https://github.com/DayoOliyide/kafkian[kafkian] for 0.9 and, may be, 0.10.0.0. |
| 22 | +It is mainly developed for 0.10.0.1 and 0.10.1.0. |
10 | 23 |
|
11 | 24 | image:https://img.shields.io/clojars/v/net.tbt-post/clj-kafka-x.svg[] |
12 | 25 |
|
13 | 26 | == Installation |
14 | 27 |
|
15 | | -Add the following to your http://github.com/technomancy/leiningen[Leiningen's] `project.clj`: |
| 28 | +Add the following to your http://github.com/technomancy/leiningen[Leiningen's] |
| 29 | +`project.clj`: |
16 | 30 |
|
17 | 31 | [source,clojure] |
18 | 32 | ---- |
19 | | -[net.tbt-post/clj-kafka-x "0.2.0-SNAPSHOT"] |
| 33 | +[net.tbt-post/clj-kafka-x "0.3.0-SNAPSHOT"] |
20 | 34 | ---- |
21 | 35 |
|
22 | 36 | == Usage |
@@ -47,7 +61,11 @@ Add the following to your http://github.com/technomancy/leiningen[Leiningen's] ` |
47 | 61 | (kc/messages c)) |
48 | 62 | ---- |
49 | 63 |
|
50 | | -NOTE: When you use multiple partitions per topic it is required to specify them explicitly when subscribing, i.e. `(kc/subscribe c [{:topic "topic-a" :partitions #{0 1}} {:topic "topic-b" :partitions #{0 1 2}}])` |
| 64 | +NOTE: When you use multiple partitions per topic it is required |
| 65 | +to specify them explicitly when subscribing, i.e. |
| 66 | +`(kc/subscribe |
| 67 | + c [{:topic "topic-a" :partitions #{0 1}} |
| 68 | + {:topic "topic-b" :partitions #{0 1 2}}])` |
51 | 69 |
|
52 | 70 | .Real-life (almost) example |
53 | 71 | [source,clojure] |
@@ -109,5 +127,6 @@ $ lein install |
109 | 127 |
|
110 | 128 | Copyright © 2016-2017 |
111 | 129 |
|
112 | | -Distributed under the http://www.apache.org/licenses/LICENSE-2.0[Apache License v 2.0] |
| 130 | +Distributed under the |
| 131 | +http://www.apache.org/licenses/LICENSE-2.0[Apache License v 2.0] |
113 | 132 |
|
0 commit comments