You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Tarun Sapra <t....@gmail.com> on 2015/10/12 14:52:36 UTC
Getting started with Kafka using Java client
Hi All,
Can someone please point me to a well documented github code example for
using Kafka 's java client. So far I haven't been able to find much related
to using Java client. Most of the examples are using command prompt for
producing and consuming messages. It's a bit frustrating that though Kafka
has been generating so much hype in Big Data space but still lacks good
examples on the internet
Thanks & Regards,
Tarun
Re: Getting started with Kafka using Java client
Posted by Ben Stopford <be...@confluent.io>.
Hi Tarun
There is an examples section in the kafka project here <https://github.com/apache/kafka/tree/trunk/examples> which shows the Consumer, SingleConsumer and Producer. These are just clients so you’ll need ZK and a Kafka server running to get them going. You probably don’t need to worry about the SimpleConsumerDemo which is an older way of interacting with Kafka.
Another option is to run a client from inside a test. There is a very simple example here <https://gist.github.com/benstopford/49555b2962f93f6d50e3>.
B
> On 12 Oct 2015, at 13:52, Tarun Sapra <t....@gmail.com> wrote:
>
> Hi All,
>
> Can someone please point me to a well documented github code example for
> using Kafka 's java client. So far I haven't been able to find much related
> to using Java client. Most of the examples are using command prompt for
> producing and consuming messages. It's a bit frustrating that though Kafka
> has been generating so much hype in Big Data space but still lacks good
> examples on the internet
>
> Thanks & Regards,
> Tarun