What Is New in Apache Kafka 2.2
Kafka 2.2 delivers a solid set of incremental improvements focused on core stability, enhanced metrics, and smoother operations. This release tightens up the foundation rather than introducing flashy new features.
| Category | Key Highlights |
|---|---|
| New Features | Kafka Streams Scala 2.13 support, ListGroup API for AdminClient |
| Improvements | Enhanced metrics, better log compaction, TLS 1.3 support |
| Bug Fixes | Numerous fixes for streams, core, connect, and clients |
| Deprecations | Deprecated TLS 1.0 and 1.1 in documentation |
What are the core broker and client upgrades?
The broker and client libraries got several under-the-hood upgrades that improve day-to-day operations. You get better metrics for monitoring and more secure communication channels out of the box.
New metrics for request times and network threads make it easier to pinpoint bottlenecks. TLS 1.3 is now supported, providing stronger encryption for data in motion. In practice, these changes mean less guesswork during performance tuning and a more secure cluster by default.
How is Kafka Streams improved for developers?
Kafka Streams received significant attention in this release, especially for Scala developers. The addition of support for Scala 2.13 is a big deal for teams standardizing on that version of the language.
Beyond language support, there were critical bug fixes for state store restoration and handling during rebalances. This matters because it directly impacts the reliability of your streaming applications during maintenance or failure scenarios. The upgrades make stateful stream processing more robust.
What changed with Kafka Connect?
Connect's stability and configurability saw nice improvements. The release includes fixes for task timeouts and source connector offset handling, which were common pain points.
You can now configure the number of Connect worker threads directly, giving more control over resource allocation. For anyone running large-scale data pipelines, these fixes translate to fewer connector failures and more predictable performance.
FAQ
Should I upgrade my Kafka Streams apps for Scala 2.13?
Yes, if you're on Scala 2.13. The new artifacts (kafka-streams-scala_2.13) provide full support. You don't need to upgrade if you're still on 2.12.
Is TLS 1.3 enabled by default in 2.2?
No. TLS 1.3 is supported but not the default. You must explicitly configure it in your ssl.enabled.protocols setting to use it.
What's the benefit of the new ListGroup API?
The AdminClient.listGroups() API provides a more efficient way to enumerate consumer groups programmatically, which is useful for automation and monitoring tools.
Were there any changes to log compaction?
Yes, the idle segment retention check was improved. This helps avoid premature deletion of log segments in low-throughput topics, preventing unexpected data loss.
Does 2.2 fix the producer batch size issue?
Yes, a bug was fixed where the producer could incorrectly estimate batch sizes, leading to smaller batches and reduced throughput. This should resolve itself on upgrade.