I am trying to include Kafka module in my project.
I have added the following jars as external jar libraries in eclipse and have also update the build.xml to include the references to the jar:
public class KafkaWriteRequestProducer extends Thread
private final String topic;
private final KafkaProducer<Integer, byte> producer;
private final WriteRequest writeRequest;
public KafkaWriteRequestProducer(String topic, WriteRequest writeRequest)
this.topic = topic;
this.writeRequest = writeRequest;
//Initialize the config for Kafka Producer
Properties props = new Properties();
producer = new KafkaProducer<Integer, byte>(props);
For completion sake, the reason why I was seeing the error was because I didn't have the jars specified in the classpath. Once, I added the jars to the classpath, it worked perfectly well.