I am using the following to write a message producer:
- Maven
- Java 1.8
- Ubuntu
My pom.xml file has this entry from http://kafka.apache.org/documentation.html#theproducer
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>0.8.2.0</version>
</dependency>
When I issued here is what my HelloWorld.java app looks like:
import kafka.javaapi.producer.Producer;
public class HelloWorld
{
public static void main(String args[])
{
int x = 4;
System.out.println("hello world");
}
}
I then compile using Maven.
mvn compile
But I get the following error.
[ERROR] /home/azureuser/test-application/src/main/java/HelloWorld.java:
[6,30] package kafka.javaapi.producer does not exist
Does anyone know what is missing?
Any help appreciated.