Status
Current state: "Under Discussion"
Discussion thread:
JIRA:
Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).
Motivation
Kafka currently supports Java 8, 11 and 15 (soon to be 16). In other words, we support the two most recent LTS versions and the most recent non LTS version. Since we have to compile and run the tests on each supported version, there is a non-trivial cost from a development and testing perspective.
Java 17 will be released later this year and it will be a LTS release. To avoid supporting 4 Java releases once Java 18 is released, we would like to drop support for Java 8. However, there are additional considerations:
- Java 8 is still the most widely used Java version.
- A deprecation period is required before we remove support for a given Java version and the removal should happen in a major Kafka release.
- Important projects we depend on may remove support for Java 8 before we do, which may result in challenges when it comes to updates required due to CVEs. One example is Jetty 10.
- It's often harder to upgrade the Java version in all applications than upgrade the Java version in services (eg brokers, connect, etc.).
Given the above, we propose deprecating Java 8 support
Java 8 was released in XX and Java 11 was released on YYY and Java 15 was released in June 2019. We expect Apache Kafka 3.0 to be released around July/August 2021 and 4.0 will be at least 16 months after that. Given this, we propose to deprecate Scala 2.12 support n Apache Kafka 3.0 and to drop it in Apache Kafka 4.0. Users will have ample time and warning to migrate away from Scala 2.12.
Public Interfaces
None.
Proposed Changes
- Deprecate Java 8 build in Kafka 3.0.
- In Kafka 4.0:
Change
sourceCompatibility
from1.7
to1.8
inbuild.gradle.
- Remove all Java 8 specific code (including workarounds and conditional code based on the Java version).
- Update Readme not to mention Java 8 as a supported version.
Compatibility, Deprecation, and Migration Plan
Users who have not and cannot upgrade to Java 11 can continue to use Kafka 3.x until they can upgrade the given application or cluster. This can be done incrementally since the protocol is compatible independently of the Java version.
Rejected Alternatives
- Continue supporting Java 8 in the clients module.