What Is New in Apache Kafka 2.7
This release brings incremental improvements focused on stability, performance, and preparing the ground for future enhancements. Here's a high-level summary of the key changes.
| Category | Key Updates |
|---|---|
| New Features | Support for Java 15, New metrics, KIP-584 (Versioning Scheme) |
| Improvements | ZooKeeper session timeout handling, Log cleaner, Client performance |
| Bug Fixes | Numerous fixes across core, streams, connect, and clients |
| Deprecations | Older message format configurations, MessageFormatter interface |
What are the main performance and stability upgrades?
The core of 2.7 is about making the broker and clients more robust. They improved how the broker handles ZooKeeper session timeouts to prevent unnecessary controller elections, which is huge for cluster stability. The log cleaner also got smarter about avoiding unnecessary I/O operations.
On the client side, there are tweaks to reduce latency and improve the throughput of the producer and consumer. These are the kind of under-the-hood optimizations that you might not notice directly but add up to a smoother experience, especially at scale.
What new metrics should I start watching?
This release adds several new metrics that give you better visibility. For the consumer, metrics like request-latency-avg help pinpoint communication bottlenecks. For the broker, new metrics around the timeline data structures in the Raft layer (kafka.controller:type=KafkaController,name=TimelineQueueTimeMs) provide deeper insight into controller performance.
In practice, these are gold for debugging. If you're seeing latency spikes, these new data points can help you figure out if it's a network issue, a broker-side processing delay, or something else entirely.
Is Java 15 now supported?
Yes, Kafka 2.7 adds support for running on Java 15. The build and test cycles now include it. This matters because it lets you adopt newer Java versions for their performance and GC improvements while staying on a stable Kafka release.
Remember, the official recommendation is still to use Java 11 (LTS) for production, but having support for 15 gives you a path for testing and future migration.
What's the deal with the new versioning scheme (KIP-584)?
KIP-584 introduces a new versioning scheme that decouples the Kafka protocol version from the server version. This is a foundational change for the community. It means new protocol features can be developed and adopted faster without being tied to a specific server release.
For now, you won't see a direct impact as a user. But down the line, this enables more rapid innovation and smoother rolling upgrades when new protocol features are introduced.
What has been deprecated that I need to know about?
A few older configurations are now formally deprecated. The message.format.version, log.message.format.version, and inter.broker.protocol.version settings are flagged for removal. If you're still running an ancient format, it's time to plan your upgrade.
The kafka.tools.MessageFormatter interface is also deprecated in favor of the new kafka.common.MessageFormatter. You'll need to update any custom formatters you've written that implement the old interface.
FAQ
Should I upgrade to Kafka 2.7 immediately?
If you're on an earlier 2.x version, the upgrade should be straightforward. The improvements in stability and metrics are worth it. As always, test in a staging environment first, but there are no massive breaking changes that should hold you back.
Do I need to change my client code for 2.7?
For most applications, no. The client changes are largely backward-compatible. The main exception is if you implemented the deprecated MessageFormatter interface; you'll need to update that.
What's the most significant bug fix in this release?
There are many, but the fixes around potential data loss in the log cleaner and the handling of corrupted transaction indexes are critical for anyone relying on exactly-once semantics.
Does KIP-584 affect my current cluster?
No, the new versioning scheme is backward-compatible. Your existing clusters and clients will continue to work without any modification. It's a change for future development.
Are there any new security advisories for 2.7?
The release notes do not highlight any new CVEs or security patches for 2.7 itself. Always check the latest security advisories for the entire Kafka ecosystem, however.