You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by "Yu, Libo " <li...@citi.com> on 2013/04/24 00:47:56 UTC

develop customized producer and consumer in java

Hi,

I have read many documentation about Kafka but am still confused about
the Java development . If I want to integrate kafka into our system, I need
to write my own producer and consumer in Java. It is not very clear to me
what Java APIs are available to client developers and there is no detailed
documentation for those APIs. The other thing is about compiling. How to
find all the required jars to compile a customized producer and consumer?
Do I need to learn Scala? I will appreciate if anyone can give me some details.

Regards,

Libo


Re: develop customized producer and consumer in java

Posted by Jun Rao <ju...@gmail.com>.
To write the client code, you can follow the examples in
http://kafka.apache.org/quickstart.html (0.7) or
https://cwiki.apache.org/confluence/display/KAFKA/0.8.0+Producer+Example(0.8).

You don't need to know scala to write the clients in java, but you do need
the scala jar at runtime.

In 0.8, if you run the following, all dependant jars will be included in
the release zip or tar file.
./sbt update
./sbt package
./sbt release-zip (or ./sbt release-tar)

Thanks,

Jun


On Tue, Apr 23, 2013 at 3:47 PM, Yu, Libo <li...@citi.com> wrote:

> Hi,
>
> I have read many documentation about Kafka but am still confused about
> the Java development . If I want to integrate kafka into our system, I need
> to write my own producer and consumer in Java. It is not very clear to me
> what Java APIs are available to client developers and there is no detailed
> documentation for those APIs. The other thing is about compiling. How to
> find all the required jars to compile a customized producer and consumer?
> Do I need to learn Scala? I will appreciate if anyone can give me some
> details.
>
> Regards,
>
> Libo
>
>

Re: develop customized producer and consumer in java

Posted by Neha Narkhede <ne...@gmail.com>.
Hi,

The API docs are here
-http://people.apache.org/~joestein/kafka-0.7.1-incubating-docs/.
These are not very complete, we will try our best to publish 0.8 APIs
clearly. For Java examples, you can look at examples/ directory. Both
clients exist in the main kafka jar.

Thanks,
Neha

On Tue, Apr 23, 2013 at 3:47 PM, Yu, Libo <li...@citi.com> wrote:
> Hi,
>
> I have read many documentation about Kafka but am still confused about
> the Java development . If I want to integrate kafka into our system, I need
> to write my own producer and consumer in Java. It is not very clear to me
> what Java APIs are available to client developers and there is no detailed
> documentation for those APIs. The other thing is about compiling. How to
> find all the required jars to compile a customized producer and consumer?
> Do I need to learn Scala? I will appreciate if anyone can give me some details.
>
> Regards,
>
> Libo
>