Versions Compared

Key

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

...

Since Scala 2 is not binary compatible across minor versions, a separate kafka  (aka core ) artifact is published for each supported Scala version (as is typical for Scala projects). More concretely, we currently publish kafka_2.12 and kafka_2.13 for Scala 2.12 and 2.13 respectively. This requires building the project and running all the tests once for each supported Scala version. In addition, it's not uncommon for contributors to have to fix pull requests so that they work on both Scala versions).

Projects written in Java can use any of the two jars (i.e. there is no benefit in having both artifacts), but projects written in Scala should use the jar with the matching Scala version. It is worth noting that the kafka  jar does not expose any public API, so we are doing extra work to support Scala users who access internal APIs. That said, it's not uncommon for users and other projects to depend on internal broker classes to start an embedded kafka cluster for testing purposes (we should have a public API for testing, but that's a subject for another KIP).

...