I am trying to import kafka Classes with a Java Program, I couldn’t find the Java Classes that I need to import, such as:
import kafka.message.Message;
import kafka.utils.Utils;
Could anyone tell me where I can find these Java Classes and how to provide them? It appears to me that Kafka is written in Scala and so I can’t find those java classes after I download its source code.
You first need to build the Kafka release if you’ve not already done that with:
The simplest thing to do is then to just put the resulting kafka-[VERSION].jar (in kafka-0.7.2-incubating-src/core/target/scala_2.8.0/) and the other needed dependencies on your build path and it should work.
All dependencies (in kafka-[VERSION]-incubating-src/core/lib_managed/scala_2.8.0/compile/) are resolved with the sbt update.
You can follow the steps at http://kafka.apache.org/07/quickstart.html