Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the different between kafka artifactIds kafka_2.10 and kafka-clients?

Tags:

apache-kafka

What is different about the following maven dependency for Kafka 0.9 client API?

Part 1:

<dependency>
    <groupId>org.apache.kafka</groupId>
    <artifactId>kafka_2.10</artifactId>
    <version>0.9.0.0</version>
    <exclusions>
        <exclusion>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
        </exclusion>
    </exclusions>
</dependency>
<dependency>
    <groupId>org.scala-lang</groupId>
    <artifactId>scala-library</artifactId>
    <version>2.10.0</version>
</dependency>

Part 2:

<dependency>
    <groupId>org.apache.kafka</groupId>
    <artifactId>kafka-clients</artifactId>
    <version>0.9.0.0</version>
</dependency>
like image 775
chao zhang Avatar asked Feb 01 '16 04:02

chao zhang


2 Answers

The kafka-clients was introduced only recently and is meant to hold the new clients, which are pure Java implementations and cleanly isolated from the server code. The old clients (including what we call the "old" consumer since a new consumer is being developed, but is really the "current" consumer) are in the core module (kafka_<scala_version>).

source

like image 152
Grainier Avatar answered Sep 29 '22 05:09

Grainier


Kafka_2.10 dependency means that the current Kafka is implemented in Scala 2.10 which is the programming language Kafka is written in. kafka-clients 0.9.0.0 means that the client can talk to Kafka of version 0.9.0.0.

To sum it up, 2.10 is the programming language Scala's version # while 0.9.0.0 is the streaming platform Kafka's version #.

like image 26
Gongqin Shen Avatar answered Sep 29 '22 07:09

Gongqin Shen