Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Even though Java 11 was released in September 2018 (over 5 years ago) and usage is on a downward trend, it is still commonly used.
  2. A deprecation period is required before we remove support for a given Java version and the removal should happen in a major Kafka release.
  3. Important projects we depend on may remove support for Java 11 before we do, which may result in challenges when it comes to updates required due to CVEs. One example is Jetty 12, which requires Java 17.
  4. It is often harder to upgrade the Java version in applications that embed libraries (like kafka clients or kafka streams) than it is to do so for services (like kafka brokers). Connect is somewhere in between as some connectors may have library dependencies that do not work with newer Java versions.

Balancing the various aspects, we propose only deprecating Java 11 support for the kafka broker, its dependent modules and the tools module in Apache Kafka 3.7 with support being dropped in Apache Kafka 4.0. The remaining modules (clients, streams, connect, etc.) will continue to support Java 11. This approach is similar to the one introduced by Elasticsearch 8.0 where the server requires Java 17, but the client requires an older Java version.

Update: the adoption of KIP-1032 means that connect and their dependent modules (like MirrorMaker 2) also require Java 17 in Apache Kafka 4.0.

Public Interfaces

None.

Proposed Changes

  • Deprecate Java 11 build for the kafka broker and its dependent modules in Kafka 3.7: update documentation including the downloads page.
  • In Kafka 4.0:
    • Set sourceCompatibility/targetCompatibility/release to 17 for the relevant modules in build.gradle.

    • Remove all Java 11 specific code from the relevant modules.
    • Update Readme and documentation (including the downloads page) to specify Java 17 as a requirement for the kafka broker and relevant modules. All other modules (including clients, streams and connect) would continue to require Java 11 (as specified by KIP-750).
    • Update: the adoption of KIP-1032 means that only kafka-clients, generator, kafka-streams , kafka-streams-test-utils, kafka-streams-scala and kafka-test-common-runtime  support  support Java 11, the other modules require Java 17 or higher.

Compatibility, Deprecation, and Migration Plan

...