Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Mark as adopted.

Table of Contents

Status

Current stateUnder DiscussionAdopted

Discussion thread: TBDhttp://search-hadoop.com/m/uyzND1x9nfFvpCne2

JIRA:

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

...

We currently build Kafka for 3 Scala versions: 2.10, 2.11 and the recently released 2.12 (not yet enabled in the "All" targets as it requires Java 8, but we have a Jenkins build for this version during PR validation). 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

Scala 2.10 was released in March 2013 (support ended in March 2015, almost 2 years ago), 2.11 was released in April 2014 and 2.12 was released in November 2016. A reasonable policy is to support the 2 most recently released versions so that we can strike a good balance between supporting older versions, maintainability and taking advantage of language and library improvements. Furthermore, since the recommended clients (producer and consumer) are now pure Java, this should mostly affect the broker and tools where support for older Scala versions matters less.

In our downloads page, we have recommended the Kafka binaries built with Scala 2.11 since Kafka 0.9.0.0.

Moving to 2.11 as the minimum requirement would allow us to benefit from faster Map implementations like LongMap and AnyRefMap, improved compiler warnings for potential bugs as well as faster compilation performance, faster compilation and the ability to use libraries that are only available for Scala 2.11 and above (an example is scala-logging, which improves upon our Logging trait by not creating closures or affecting stacktraces/log line information). See the announcement for the full list of improvements.

...

Users who have not and cannot upgrade to Scala 2.10 11/2.12 and are still using the old clients would have to continue to using use Kafka 0.10.x until they can upgrade to one of the new more recent Scala version or move update their code to use the recommended Java clients (which is recommended anyway).

Rejected Alternatives

  1. Support 3 Scala versions in the next major release, 2.10, 2.11 and 2.12: the cost seems to outweigh the benefits.