Skip to main content

Module metadata_version

Module metadata_version 

Source
Expand description

KIP-778 metadata.version feature-level model.

The canonical string<->integer-level table, mirrored byte-for-byte from upstream Kafka’s MetadataVersion enum over the range Krabka advertises ([METADATA_VERSION_MIN, METADATA_VERSION_MAX]). JVM clients call MetadataVersion.fromFeatureLevel(N) and throw on any level their enum does not know, so the levels and X.Y-IVn names here MUST match upstream exactly. Verify against MetadataVersion.java in Kafka’s server-common module on trunk before editing: levels are never reused, so the table must carry every level up to METADATA_VERSION_MAX, reserved ones included.

Structs§

MetadataVersion
One metadata.version level: its integer feature level, canonical X.Y-IVn name, short X.Y form, and Kafka’s didMetadataChange flag.

Constants§

CIDR_ACL_MIN_LEVEL
Level at which ACL host patterns may be CIDR blocks (4.4-IV1, KIP-1276).
CONTROLLER_UNREGISTRATION_MIN_LEVEL
Level at which a controller may be unregistered (4.4-IV2, KIP-1312): Kafka’s MetadataVersion.isControllerUnregistrationSupported.
CORDONED_LOG_DIRS_MIN_LEVEL
Level at which RegisterBrokerRecord and BrokerRegistrationChangeRecord carry KIP-1066 cordoned log directories (4.3-IV0).
DELEGATION_TOKEN_MIN_LEVEL
Level at which KRaft gained delegation tokens (3.6-IV2).
DIRECTORY_ASSIGNMENT_MIN_LEVEL
Level at which partition directory assignments became part of the KRaft metadata records (3.7-IV2, KIP-858).
ELR_DEFAULT_METADATA_LEVEL
Level at which ELRV_1 becomes the bootstrap default (4.1-IV0, EligibleLeaderReplicasVersion.ELRV_1’s bootstrap metadata version).
ELR_MIN_LEVEL
Level at which partition records gained KIP-966 eligible-leader fields (4.0-IV1).
ELR_VERSION_FEATURE
The eligible.leader.replicas.version feature name (KIP-966). Gates the controller’s maintenance of eligible leader replicas.
ELR_VERSION_MAX
Maximum supported eligible.leader.replicas.version level: 1, ELRV_1, which turns KIP-966 ELR maintenance on.
ELR_VERSION_MIN
Minimum supported eligible.leader.replicas.version level: 0, ELRV_0, the level at which the controller keeps no ELR.
KRAFT_VERSION_FEATURE
KIP-853 Raft protocol and dynamic-membership feature.
METADATA_DOWNGRADE_CAPABILITY_FEATURE
Krabka registration-only marker for KIP-1155 downgrade support.
METADATA_DOWNGRADE_CAPABILITY_LEVEL
The only supported level of METADATA_DOWNGRADE_CAPABILITY_FEATURE.
METADATA_VERSION_FEATURE
The metadata.version feature name (KIP-584 / KIP-778).
METADATA_VERSION_MAX
Maximum supported level: 4.5-IV0, Kafka trunk’s latestTesting (the Kafka 4.5.0 release level, which changes no metadata record format).
METADATA_VERSION_MIN
Minimum supported level: 3.3-IV3 (KRaft GA), the floor that real Kafka 4.0 supports.
ONLINE_DOWNGRADE_MIN_LEVEL
Lowest level that supports controller registrations (3.7-IV0).
SCRAM_MIN_LEVEL
Level at which KRaft gained SCRAM credentials (3.5-IV2).
SHARE_VERSION_2_DEFAULT_METADATA_LEVEL
Level at which share.version 2 becomes the bootstrap default (4.4-IV0, trunk’s ShareVersion.SV_2 bootstrap metadata version, KIP-1191).
SHARE_VERSION_DEFAULT_METADATA_LEVEL
Level at which share.version 1 becomes the bootstrap default (4.2-IV0, ShareVersion.SV_1’s bootstrap metadata version, KIP-932 GA).
SHARE_VERSION_FEATURE
The share.version feature name (KIP-932). Gates share-group membership.
SHARE_VERSION_MAX
Maximum supported share.version level: 2, trunk’s ShareVersion.SV_2 (KIP-1191 dead-letter queues).
SHARE_VERSION_MIN
Minimum supported share.version level: 0 (feature disabled).
STREAMS_VERSION_DEFAULT_METADATA_LEVEL
Level at which streams.version 1 becomes the bootstrap default (4.2-IV1, StreamsVersion.SV_1’s bootstrap metadata version, KIP-1071 GA).
STREAMS_VERSION_FEATURE
The streams.version feature name (KIP-1071). Gates the broker-side Streams rebalance protocol (StreamsGroupHeartbeat / StreamsGroupDescribe).
STREAMS_VERSION_MAX
Maximum supported streams.version level: 1 (KIP-1071 early access).
STREAMS_VERSION_MIN
Minimum supported streams.version level: 0 (feature disabled).

Functions§

did_metadata_change
Kafka’s didMetadataChange flag for level, or None for a level outside the supported table.
from_feature_level
Look up a level by integer feature level. None if outside the supported table.
from_version_string
Resolve a version string to a level.
is_supported_level
True if level is within [METADATA_VERSION_MIN, METADATA_VERSION_MAX].
metadata_changed_between
Kafka’s MetadataVersion.checkIfMetadataChanged: whether moving between from and to, in either direction, crosses a level that changed the metadata record format. Equal levels never do.