Skip to content
Back to skills

Apache Kafka Knowledge Patch

ASecurity

Apache Kafka

  • 25 stars
  • 0 votes
  • 0 copies
  • 12 views
  • Added September 5, 2026
developmentgojavaapisecurityperformance

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 8 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill apache-kafka-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Apache Kafka Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Apache Kafka Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-apache-kafka-knowledge-patch/badge)](https://www.skillsdirectory.com/skills/nevaberry-apache-kafka-knowledge-patch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: apache-kafka-knowledge-patch
description: Apache Kafka
version: "4.4.0"
license: MIT
metadata:
  author: Nevaberry
---


# Apache Kafka Compatibility

Load this skill when upgrading or maintaining Apache Kafka brokers, clients,
Kafka Streams, Kafka Connect, or MirrorMaker, and when updating their
configuration, security, monitoring, or command-line integrations.
Use the quick references below for migration decisions, then open the relevant
topic file for the full guidance, examples, and version-specific conditions.

## Reference index

| Reference | Topics |
| --- | --- |
| [Upgrades and runtime](references/upgrades-and-runtime.md) | Runtime and wire compatibility, KRaft finalization, downgrade boundaries, corrective releases |
| [Brokers and storage](references/brokers-and-storage.md) | Replication, retention, timestamps, log directories, tiered storage, KRaft quorum, coordinators |
| [Clients, groups, and transactions](references/clients-groups-and-transactions.md) | Producers, consumer lifecycle, discovery, share groups, transactions, Admin APIs |
| [Connect and MirrorMaker](references/connect-and-mirrormaker.md) | Plugin migrations, overrides, converters, replication, offset translation, metric names |
| [Kafka Streams](references/kafka-streams.md) | Upgrades, rebalance protocols, topology, joins, state, headers, queries, error handling, metrics |
| [Security, observability, and tools](references/security-observability-and-tools.md) | OAuth, JAAS, ACLs, telemetry, JMX, logging, CLI and benchmark migrations |

## Upgrade constraints and corrective releases

Before upgrading KRaft to 4.0, both running software and cluster metadata must
be at least 3.3.x. For older KRaft clusters, the recommended intermediate upgrade
is 3.9.x before moving to 4.x. Roll brokers individually and verify before finalizing.

Finalizing 4.0 prevents a metadata downgrade. Kafka 4.2 preserves the metadata
format, but downgrade is supported only if every metadata version crossed also
preserves it. Finalizing 4.3 crosses the format-changing `4.3-IV0` boundary and
blocks metadata downgrade across that boundary.

Upgrade Java clients to at least 2.1 before moving brokers to 4.0; upgrade
brokers to at least 2.1 before deploying 4.0 Java clients. This floor also
applies to the Java clients embedded in Connect and Streams.

Use 4.2.1 or later for rolling upgrades to 4.2 with transactional producers;
the mixed-version issue can surface as `UnsupportedVersionException`.
Kafka 4.1.2 fixes a rare producer issue that could send a record to the wrong topic.
Admin 4.3.1 fixes partition-leader requests that can hang after a cached leader leaves.

Use at least Streams 4.1.1 on the 4.1 line for the memory-leak and potential
data-loss fixes. Upgrade Streams applications directly to 4.3.1 for the critical
native RocksDB memory-leak fix and stale-offset restart fix.
Use 4.0.1 or later when migrating `KStream.transformValues()` to `processValues()`.

## Breaking changes and deprecations

### Configuration and security

In 4.0, `org.apache.kafka.sasl.oauthbearer.allowed.urls` defaults to an empty
list. Set it on every JVM using OAuth token or JWKS endpoints.
Move `OAuthBearerLoginCallbackHandler` and `OAuthBearerValidatorCallbackHandler`
references from the `secured` subpackage to `org.apache.kafka.common.security.oauthbearer`.

Use `org.apache.kafka.allowed.login.modules`; the disallowed-module setting is
deprecated. `KafkaPrincipalBuilder` extends `KafkaPrincipalSerde`, so custom
builders must implement principal serialization and deserialization.

With `message.timestamp.type=CreateTime`, 4.0 rejects timestamps more than one
hour ahead by default. Tune `message.timestamp.after.max.ms` on a topic or
`log.message.timestamp.after.max.ms` on a broker. Replace the old broker
`log.message.timestamp.difference.max.ms` with separate before/after bounds.

Enabling Eligible Leader Replicas removes per-broker `min.insync.replicas`
overrides; customize the default at cluster level. New 4.1 clusters enable ELR by default.
Keep the log cleaner enabled: `log.cleaner.enable` is deprecated, and plan for
at least one `log.cleaner.threads` when that setting is removed.

Replace `remote.log.manager.thread.pool.size` with
`remote.log.manager.follower.thread.pool.size` in 4.2. The follower pool can be
resized dynamically. `num.replica.fetchers` requires at least `1`.

`group.coordinator.rebalance.protocols` is deprecated for removal in 5.0;
in 5.0 all group protocols are enabled, with availability controlled through
`group.version`, `streams.version`, and `share.version` using `kafka-features.sh`.
Kafka 4.4 deprecates `broker.id` and `ClientQuotaCallback.updateClusterMetadata`.

### Client and Admin APIs

For `max.in.flight.requests.per.connection` greater than `5`, explicitly set
`enable.idempotence=false`. For idempotent producers, keep the limit at `5` or below.
Call `KafkaProducer.flush()` outside send callbacks; 4.1 rejects calls inside them.

Abort the current transaction on `TransactionAbortableException` or on a timeout
during transactional work before commit to avoid duplicates from retrying the work.

Handle `GroupIdNotFoundException` from `Admin.describeConsumerGroups` for missing
groups instead of checking for a `DEAD` description. Use `GroupState` across
group types. Replace `Admin.listConsumerGroups()` with
`admin.listGroups(ListGroupsOptions.forConsumerGroups())` for consumer-only results.

For name-based requests, use `topicNameValues()` on `DeleteTopicsResult` and
`DescribeTopicsResult`, and `allTopicNames()` instead of `DescribeTopicsResult.all()`.
Use `DescribeLogDirsResult.descriptions()` or `allDescriptions()` for log directories.

Use `Consumer.close(CloseOptions)` to control explicit group departure and
rebalance on shutdown; `Consumer.close(Duration)` is deprecated. To save current
positions, commit them explicitly before `Consumer.unsubscribe()` even when auto-commit is enabled.

### Scripts and monitoring

Use comma-separated endpoints with `--bootstrap-server`; bundled KRaft properties
now live in `config/`, following removal of `config/kraft/`. Remove `--force`
from `kafka-configs.sh`. The 4.0 tool requires broker 2.3 or later to alter broker configs.

The deprecated CLI spellings below are scheduled for removal in 5.0.
The tools reference gives the exact affected commands and additional option changes.

| Context | Migration |
| --- | --- |
| Console consumer formatting | `--property` → `--formatter-property key=value` |
| Console producer reading | `--property` → `--reader-property key=value` |
| Console client settings | `--producer-property` / `--consumer-property` → `--command-property key=value` |
| Console, performance, and verifiable client config files | `--producer.config` / `--consumer.config` → `--command-config <file>` |
| Console producer batching | `--max-partition-memory-bytes` → `--batch-size` |
| Consumer and share-consumer performance counts | `--messages` → `--num-records` |

Kafka 4.0 removes `auto.include.jmx.reporter`; `metric.reporters` includes
`org.apache.kafka.common.metrics.JmxReporter` by default. Rename JMX filters to
`metrics.jmx.include` and `metrics.jmx.exclude`.
Use `bufferpool-wait-time-ns-total`, `io-wait-time-ns-total`, and `io-time-ns-total`
for the renamed client metrics. Other metric-name and tag migrations are in the reference.

### Connect and MirrorMaker integrations

Fetch task configurations through `GET /connectors/{connector}/tasks`; 4.0 removes
`GET /connectors/{connector}/tasks-config`. Update affected custom extensions
to Jakarta EE 10 equivalents and account for removed task callbacks.

`MirrorSourceConnector` always uses incremental configuration updates, requiring
target brokers at least 2.3.0. Remove `use.incremental.alter.configs` and
`add.source.alias.to.metrics`; the source alias is always included in metrics.

Use `AllowlistConnectorClientConfigOverridePolicy` with
`connector.client.config.override.allowlist` for permitted client keys.
Kafka 5.0 makes this the default and removes `PrincipalConnectorClientConfigOverridePolicy`.
Opt into MirrorMaker's KIP-877 metric names with `metric.names.formats`;
the existing names are deprecated for removal in 5.0.

### Streams state and API migrations

Streams 4.0 can write RocksDB format 6. To roll back a changelog-backed store,
remove its local state written by 4.0 and restore from its changelog.
To downgrade from 4.3 to 4.2 or earlier, stop each instance, delete its local
`state.dir`, and start the older version to restore from changelogs: older versions
cannot open the RocksDB store containing the 4.3 `offsets` column family.

Streams 4.3 automatically migrates per-task `.checkpoint` files on first startup
and tracks changelog offsets per store. Custom stores can opt in through
`managesOffsets()`, `commit(Map<TopicPartition, Long>)`, and `committedOffset(TopicPartition)`.

For a rolling upgrade to Streams 4.3 from 2.4–3.4, set `upgrade.from` to the old
major/minor version for the first rollout, then remove it and roll every instance again.
The Streams reference also covers repartition-format downgrades and exactly-once migration.

Replace the `default.deserialization.exception.handler` and
`default.production.exception.handler` settings with `deserialization.exception.handler`
and `production.exception.handler`. The production handler receives retriable
`TimeoutException`s and defaults to `RETRY`; custom handlers can return `CONTINUE` or `FAIL`.

Pass the top-level `org.apache.kafka.streams.CloseOptions` to `KafkaStreams.close()`;
the nested type and its overload are deprecated. The `kafka-streams-scala` module
is deprecated in 4.3 for removal in 5.0; migrate to the Java API.

## Groups, state, and operational features

### Share groups and Streams rebalance protocols

Share groups are production-ready in 4.2; use 4.2.1 or later for the deadlock fix.
Before first use on fewer than three brokers, set both
`share.coordinator.state.topic.replication.factor=1` and
`share.coordinator.state.topic.min.isr=1` so Kafka can create `__share_group_state`.

Use `record_limit` for strict share-fetch counts; `batch_optimized` treats the
limit as soft. In explicit acknowledgement mode, use `RENEW` to extend the lock
on an in-progress record. Share groups also support dead-letter topics and
starting offsets supplied directly or from a file.

The core Streams Rebalance Protocol is production-ready in 4.2. New Streams groups
can be created on 4.2.0; offline migration from classic groups is safe starting
with 4.2.1. The reference separately documents the disabled-by-default 4.1
early-access activation steps and limits, and later static membership and custom assignors.

### Header-aware stores, queries, and error handling

Use `dsl.store.format=HEADERS` to opt supported DSL operators into header-aware
stores. Processor API stores require matching header-aware supplier and builder
factories. Existing `store()` query facades expose only values or `ValueAndTimestamp`.
The Streams reference includes header-aware IQv2 types and read isolation APIs.

Header retention depends on the operator: stream-stream join window stores retain
source headers, but join results may carry only the triggering record's headers.
Suppression and left/outer stream-stream join buffers drop headers.

With `DefaultProductionExceptionHandler`, set `errors.dead.letter.queue.topic.name`
to forward error records. Custom handlers must build dead-letter records themselves
and may ignore the setting. Global-store processing can invoke the configured
`ProcessingExceptionHandler` with `processing.exception.handler.global.enabled=true`,
but dead-letter queues are unavailable for this path in 4.3.

### Storage, discovery, and telemetry

Use `cordoned.log.dirs` to prevent new partition placement in selected directories.
Set `follower.fetch.last.tiered.offset.enable=true` to let a new follower with no
local data fetch from the leader's earliest pending upload offset; it defaults to `false`.

Clients can rebootstrap when metadata updates stall for the timeout or a broker
requests it, even if some known brokers remain reachable.
`bootstrap.resolve.timeout.ms`, for waiting on unresolved bootstrap server names,
is experimental in 4.4.

Applications can send their own metrics through KIP-714 telemetry alongside client
metrics. Supported plugins can implement `Monitorable` for plugin-tagged metrics;
Connect connectors and tasks register metrics through their contexts.

Files in this skill

  • SKILL.md10.1 KB
  • coverage.json1 KB
  • references/brokers-and-storage.md7.2 KB
  • references/clients-groups-and-transactions.md7.3 KB
  • references/connect-and-mirrormaker.md3.8 KB
  • references/kafka-streams.md11.6 KB
  • references/security-observability-and-tools.md7.7 KB
  • references/upgrades-and-runtime.md6.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.