I'm facing a problem when I want to instantiate a KafkaProducer : 

```
Properties props = new Properties();
props.put("bootstrap.servers", "localhost:9092");
props.put("acks", "all");
props.put("retries", 0);
props.put("batch.size", 16384);
props.put("linger.ms", 1);
props.put("buffer.memory", 33554432);
props.put("key.serializer","org.apache.kafka.common.serialization.StringSerializer");
props.put("value.serializer","org.apache.kafka.common.serialization.StringSerializer");

Producer<String, String> producer = new KafkaProducer<>(props);

```

> 
> **the type kafkaconsumer is not generic it cannot be parameterized with arguments**
> 
> 
> 

I don't understand the error knowing that I'm following the official kafka javadoc in which they do exactly the same thing with the same dependency as mine: 

<https://kafka.apache.org/11/javadoc/index.html?org/apache/kafka/clients/producer/KafkaProducer.html>

Can someone explain me this joke ?