You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Chris Bedford <ch...@buildlackey.com> on 2013/10/23 01:02:53 UTC
Produce/Consumer Example With In-Memory Kafka and Zookeeper Test
Fixture Servers - i would welcome help with the Maven dependencies.
Hi, Kafka users -
I'm just starting out with the framework and I've created a Maven-buildable
example that
should work out of the box.
The example is available here > https://github.com/buildlackey/cep
and it illustrates how to:
* unit test message passing between Kafka producers and consumers
using basic String serialization.
* use of Netflix's curator API to instantiate an in-process zookeeper
server, together with an in-memory instance of the
kafka.server.KafkaServer class
* ensure that all threads launched by Kafka and zookeeper are cleanly
shutdown.
There is one thing that I would welcome some help with, and that is the
Maven dependencies.
I have been fighting to find a Maven pom.xml recipe that will allow me to
pull in an official version of Kafka from a public Maven repository. I did
manage to get my example working, but for now I have had to hack my
dependencies so that the version of Kafka I use is pulled from a
work-in-progress version of a storm-kafka integration project. I'm
concerned the 'wip' versions below will be deprecated. Then this project
will lose its dependencies and fail to build properly. Also, I really
shouldn't be introducing storm for this simple Kafka example at this point
in any case.
storm
storm
0.9.0-wip17
storm
storm-core
0.9.0-wip17
storm
storm-kafka
0.9.0-wip16a-scala292
--
Chris Bedford
Founder & Lead Lackey
Build Lackey Labs: http://buildlackey.com
Go Grails!: http://blog.buildlackey.com