# Kafka - Java & Zookeeper compatability

**URL:** <https://forum.confluent.io/t/kafka-java-zookeeper-compatability/7641>\
**Category:** Managed Connectors\
**Created:** [18 April 2023 07:21 UTC](https://forum.confluent.io/t/kafka-java-zookeeper-compatability/7641 "2023-04-18T07:21:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakonconf](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@jakonconf](https://forum.confluent.io/u/jakonconf)\
**Post date:** [18 April 2023 07:21 UTC](https://forum.confluent.io/t/kafka-java-zookeeper-compatability/7641/1 "2023-04-18T07:21:01Z")

</div>

Looking for a JDK1.8 & Zk 3.4.9 compatible Kafka version.

Wondering whether the latest kafka doesn’t need Zk and has it built-in and whether it would work with jdk1.8.

TIA

---

<div class="post-metadata">

**Author:** ![mmuehlbeyer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mmuehlbeyer/32/1088_2.png) [@mmuehlbeyer](https://forum.confluent.io/u/mmuehlbeyer)\
**Post date:** [18 April 2023 11:36 UTC](https://forum.confluent.io/t/kafka-java-zookeeper-compatability/7641/2 "2023-04-18T11:36:04Z")

</div>

hey @jakonconf

welcome 🙂

regarding the java version:  
for the latest confluent platform check  
[https://docs.confluent.io/platform/current/installation/system-requirements.html#java](https://docs.confluent.io/platform/current/installation/system-requirements.html#java)

for the lastest apache kafka have look at

> **[Apache Kafka](https://kafka.apache.org/documentation/#java)**
>
> Apache Kafka: A Distributed Streaming Platform.

regarding zookeeper:  
depending on your needs you may use KRaft instead of Zookeeper with the current version of Apache Kafka or Confluent Platform.  
For information and limitations see:

> **[Apache Kafka](https://kafka.apache.org/documentation/#kraft)**
>
> Apache Kafka: A Distributed Streaming Platform.

> **[Apache Kafka](https://kafka.apache.org/documentation/#kraft_missing)**
>
> Apache Kafka: A Distributed Streaming Platform.

> **[KRaft | Confluent Documentation](https://docs.confluent.io/platform/current/zookeeper/kraft.html#)**
>
> Try out KRaft as a replacement for Zookeeper with Confluent Platform

Best,  
Michael

---

<div class="post-metadata">

**Author:** ![jakonconf](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@jakonconf](https://forum.confluent.io/u/jakonconf)\
**Post date:** [18 April 2023 13:11 UTC](https://forum.confluent.io/t/kafka-java-zookeeper-compatability/7641/3 "2023-04-18T13:11:17Z")

</div>

Thanks Michael for your kind response with all the reference links - quite useful and educative for me to understand the underlying options.

Since we have jdk1.8 dependencies by the other components we had to go with it - for kafka 3.x, I see that we are covered though deprecated.

Also we had to use zookeeper for other hadoop components and would like to share and put that to use here.

From the learning, I plan to use zookeeper 3.4.9 (basis other dependencies) and kafka 3.0.1/3.0.2 - but it uses zookeeper 3.4.14 jars. Does it(kafka) work if I simply replace the zk jars to 3.4.9 jars ?

Not sure it is appropriate for me to use the same thread to ask a different question from the topic?

---

<div class="post-metadata">

**Author:** ![mmuehlbeyer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mmuehlbeyer/32/1088_2.png) [@mmuehlbeyer](https://forum.confluent.io/u/mmuehlbeyer)\
**Post date:** [19 April 2023 05:57 UTC](https://forum.confluent.io/t/kafka-java-zookeeper-compatability/7641/4 "2023-04-19T05:57:35Z")

</div>

> [@jakonconf](#):
>
> From the learning, I plan to use zookeeper 3.4.9 (basis other dependencies) and kafka 3.0.1/3.0.2 - but it uses zookeeper 3.4.14 jars. Does it(kafka) work if I simply replace the zk jars to 3.4.9 jars ?

not fully sure whether it will work  
though it might be worth to try to connect with the 3.4.14 jars to your zookeeper 3.4.9 cluster.

> [@jakonconf](#):
>
> Not sure it is appropriate for me to use the same thread to ask a different question from the topic?

Go ahead 🙂 if needed we could create another thread I think

---

<div class="post-metadata">

**Author:** ![jakonconf](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@jakonconf](https://forum.confluent.io/u/jakonconf)\
**Post date:** [19 April 2023 18:16 UTC](https://forum.confluent.io/t/kafka-java-zookeeper-compatability/7641/5 "2023-04-19T18:16:29Z")

</div>

While starting kafka (with DEBUG & resources available), it gets killed.

Here is what I see in the logs but nothing suspectful here. Anything I am missing?

[2023-04-19 18:13:11,925] DEBUG Scheduling task auto-leader-rebalance-task with initial delay 300000 ms and period -1000 ms. (kafka.utils.KafkaScheduler)  
[2023-04-19 18:13:33,139] DEBUG Beginning log cleanup… (kafka.log.LogManager)  
[2023-04-19 18:13:33,143] DEBUG Log cleanup completed. 0 files deleted in 0 seconds (kafka.log.LogManager)  
[2023-04-19 18:13:33,156] DEBUG Checking for dirty logs to flush… (kafka.log.LogManager)  
[2023-04-19 18:13:33,192] DEBUG Scheduling task kafka-delete-logs with initial delay 60000 ms and period -1 ms. (kafka.utils.KafkaScheduler)  
Killed

---

<div class="post-metadata">

**Author:** ![jakonconf](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@jakonconf](https://forum.confluent.io/u/jakonconf)\
**Post date:** [20 April 2023 16:59 UTC](https://forum.confluent.io/t/kafka-java-zookeeper-compatability/7641/6 "2023-04-20T16:59:04Z")

</div>

Ignore the kafka server getting killed error. Looks like a weird issue of resources. Post restart of the node this went away. Now, not able to reproduce it. Hope this doesn’t recur.

---

<div class="post-metadata">

**Author:** ![OneCricketeer](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/onecricketeer/32/1551_2.png) [@OneCricketeer](https://forum.confluent.io/u/OneCricketeer)\
**Post date:** [4 June 2023 12:54 UTC](https://forum.confluent.io/t/kafka-java-zookeeper-compatability/7641/7 "2023-06-04T12:54:53Z")

</div>

> we have jdk1.8 dependencies by the other components

The server runtime doesn’t matter for external client dependencies.

You can refer the Zookeeper documentation that states that latest version is backwards compatible with older Zookeeper clients which Kafka may use.
