Versions Compared

Key

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

...

Discussion thread: here [Change the link from the KIP proposal email archive to your own email thread]

JIRA: here [Change the link from KAFKA-1 to your own ticket]

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyKAFKA-14560

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

...

We propose setting the new baseline for protocol API versions to Apache Kafka 2.1 (released 4+ years ago on Nov 2018). More concretely, for each protocol API, we will only keep the most recent version supported by Apache Kafka 2.1 as well as any version introduced after Apache Kafka 2.1. We deviate from the proposed baseline in a number of cases based on existing clients support. In order to determine client support for the various protocol API versions, we take the latest client release at the end of 2021 - this gives it a better chance of being widely used.

Apache Kafka 2.1 has been chosen as the baseline because it was released many years ago and it includes support for KIP-320 (required for proper fencing support when consuming) and KIP-110 (zstd is a popular compression mechanism).

We believe there is merit in having a general protocol API versioning policy that can be applied mechanically on each new major version - we intend to submit a separate KIP for that. It would only apply from Apache Kafka 5.0 to give the ecosystem plenty of time to adapt.

...

  • librdkafka 1.8.2, released on October 2021 (note that a number of clients are built on top of librdkafka - a few examples are Confluent's clients for Python, .NET & Go, node-rdkafka and rdkafka-ruby).
  • KafkaJS 1.15.0, released on November 2020
  • Sarama 1.30.1. released on December 2021
  • kafka-python 2.0.2, released on Sep 2020

The Java client is part of the Apache Kafka repository, it is released alongside the broker and it generally supports the latest protocol versions exposed by the broker. Given that, we know that the Java client has supported the protocol API versions baseline set by Apache Kafka 2.1 as part of that release in November 2018 and no further analysis is required.

Proposed Changes

TBDAs stated in the Public Interfaces  sections, a number of protocol API versions would no longer be supported. Kafka brokers would return the UNSUPPORTED_VERSION error when they receive a request with any of the removed API versions.

Compatibility, Deprecation, and Migration Plan

Users relying on one of the clients included in this document will have to ensure they are using the minimum version described (or a newer version) before upgrading their Kafka clusters to Apache Kafka 4.0. Users relying on clients not included in this document will have to ensure they are using a version that does not rely on protocol API versions that are being removed as part of this proposal.

The following metrics are used to determine both questions:

  • Client name and version: kafka.server:clientSoftwareName=(client-software-name),clientSoftwareVersion=(client-software-version),listener=(listener),networkProcessor=(processor-index),type=(type)
  • Request name and version: kafka.network:type=RequestMetrics,name=RequestsPerSec,request=(api-name),version=(api-version)}

As stated previously, the UNSUPPORTED_VERSION error will be returned in case incompatible clients are used with Kafka clusters running Apache Kafka 4.0.TBD (talk about broker metrics users can rely on to know if they're impacted and what happens if an unsupported protocol version is used)

Test Plan

  • Client compatibility system tests will updated so that 2.0.x clients fail with an UNSUPPORTED_VERSION error and older versions are removed.
  • Protocol API integration tests will be updated so that the highest unsupported version and lowest supported version are tested and older versions are not.
  • Protocol API unit tests will continue to cover all versions, but the expectations will be updated for unsupported versions.
  • Test simple flows end to end with the clients mentioned in this proposal against a cluster with this KIP implemented.

Rejected Alternatives

  1. Continue with the "support forever" compatibility policy: the benefit cost ratio is low given low usage of the older protocol API versions.