Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • The default value of -1 for broker.id is effectively unused in KRaft mode. If node.id is set, the synonym mechanism overwrites broker.id with the value of node.id. If neither is set, node.id validation fails with a ConfigException before the default is ever used.
  • The documentation describes node.id as required in KRaft mode, but it can currently be omitted if broker.id is set, because the synonym mechanism automatically populates node.id from broker.id. After the removal in 5.0, node.id must be explicitly set.

The behavior is the same for all process.roles (broker, controller, or combined). No changes to public APIs, network protocols, metrics, or command-line tools.

...

The following table summarizes the expected behavior for each configuration scenario across version ranges:

Configuration

Current (4.0 ~ 4.2 (Current)

Phase 1: Deprecated (4.3 ~ 4.x (Deprecated)

Phase 2: Removed (5.0 (Removed)

Only node.id set

Valid

Valid

Valid

Only broker.id set

Valid; node.id is auto-populated from broker.id

Valid + broker.id deprecation warning; node.id is auto-populated from broker.id

ConfigException: node.id is required

Both set, same value

Valid

Valid + broker.id deprecation warning

Valid; broker.id is ignored

Both set, different values

ConfigException: node.id must equal broker.id

ConfigException: node.id must equal broker.id

Valid; broker.id is ignored

Neither set

ConfigException: node.id is required

ConfigException: node.id is required

ConfigException: node.id is required

...

Users should replace broker.id with node.id in their server configuration. If both are configured, simply remove broker.id.

Downgrade Considerations

Downgrading from 5.0 to 4.x is safe as long as the same configuration file is used — any config that was valid on 4.x before the upgrade remains valid after the rollback. The only edge case is if broker.id and node.id are set to different values on a 5.0 binary (where broker.id is ignored) and then downgraded to 4.x, which would result in a ConfigException. In practice, this cannot happen if the config was originally used on 4.x.

Test Plan

Phase 1: Deprecation (Apache Kafka 4.3)

...

  • broker.id is no longer recognized and is ignored with an unknown config warning.
  • Setting only broker.id without node.id results in a ConfigException.

Rejected Alternatives

Throw ConfigException when broker.id is set in 5.0

Instead of ignoring broker.id as an unrecognized configuration in 5.0, we could explicitly throw a ConfigException. However, this would force users to update their configuration files before upgrading, making the upgrade process more disruptive. Ignoring unrecognized configurations is consistent with how other removed configurations are handled in KafkaNone.

References