Chapter 3. Enhancements
Streams for Apache Kafka 2.7 adds a number of enhancements.
3.1. Kafka 3.7.0 enhancements Copy linkLink copied to clipboard!
For an overview of the enhancements introduced with Kafka 3.7.0, refer to the Kafka 3.7.0 Release Notes.
3.2. Improved broker scale-down handling Copy linkLink copied to clipboard!
By default, Streams for Apache Kafka performs a check to ensure that there are no partition replicas on a broker before initiating a scale-down operation on a Kafka cluster. Previously, if brokers were found to still be in use, the scale-down operation was blocked and reconciliation failed. Now, the scale-down changes are reverted but the reconciliation can proceed as usual.
However, there may be scenarios where you want to bypass this blocking mechanism. For example, it might be useful to disable the check on busy clusters. To do this, you annotate the Kafka resource by setting strimzi.io/skip-broker-scaledown-check to true.
3.3. Kafka Exporter: Preventing metrics collection on disconnected consumers Copy linkLink copied to clipboard!
You can now stop collecting metrics on consumers that are no longer connected. To stop collecting metrics on disconnected consumers, set the showAllOffsets property to false in the Kafka Exporter configuration.
3.4. Making CRD labels and annotations consistent Copy linkLink copied to clipboard!
Label and annotation definitions in our CRDs (for example in the template sections) no longer accept integer values and must always use string values.
For example, this configuration:
Example template configuration with annotation
template:
apiService:
metadata:
annotations:
discovery.myapigateway.io/port: 8080
Must be as follows:
Example template configuration with annotation
template:
apiService:
metadata:
annotations:
discovery.myapigateway.io/port: "8080"
This is to avoid the potential for receiving an invalid value error:
Example invalid value error
spec.template.apiService.metadata.annotations.discovery.myapigateway.io/port:
Invalid value: "integer": spec.template.apiService.metadata.annotations.discovery.myapigateway.io/port in body must be of type string: "integer"
3.5. Drain Cleaner: Change to handling of eviction requests Copy linkLink copied to clipboard!
The way Streams for Apache Kafka Drain Cleaner handles Kubernetes pod eviction requests has changed. By default, the Drain Cleaner now denies (blocks) the Kubernetes eviction request to prevent Kubernetes from evicting the pods and instead uses the Cluster Operator to move the pod.
You can still use the previous approach, where the Drain Cleaner allows the Kubernetes eviction request while also instructing the Cluster Operator to move the pod. For this legacy mode to work, you must do the following:
-
Ste the
STRIMZI_DENY_EVICTIONDrain Cleaner environment variable tofalse. -
Configure the
PodDisruptionBudgetto not allow any pod evictions by setting themaxUnavailableoption to0.
3.6. Enhanced Kafka Connect metrics and dashboard examples Copy linkLink copied to clipboard!
The metrics collected for Kafka Connect have been enhanced to include the following:
- Collection of coordinator metrics
- Simplified metric regex
The example Grafana dashboard file for Kafka Connect has been updated to add panels that display more connector information and rebalance metrics.
3.7. Enhanced MirrorMaker 2 dashboard example Copy linkLink copied to clipboard!
The example Grafana dashboard file for MirrorMaker 2 has been updated as follows:
- New rows to organize panels
- Updated panels that display more connector information and rebalance metrics
3.8. Kafka Bridge text format Copy linkLink copied to clipboard!
When performing producer operations, POST requests must provide Content-Type headers specifying the embedded data format of the messages produced. Previously, JSON and binary were the supported formats for record and key values. It’s now possible to also use text format.
| Embedded data format | Content-Type header |
|---|---|
| JSON |
|
| Binary |
|
| Text |
|