DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
| Table of Contents |
|---|
Status
Current state: Under Discussion Accepted
Discussion thread: https://lists.apache.org/thread/6zsr70lpzqp96g4jf6kngyms4kkz1tp1
Vote thread: N/A https://lists.apache.org/thread/dtc48g4zjdj4s4n0hm99hm0xoho5sp1n
JIRA:
| Jira | ||||
|---|---|---|---|---|
|
...
This KIP proposes to deprecate the broker.id server configuration property in Apache Kafka 4.3 4 and remove it in Apache Kafka 5.0.
Config | Default | 4.34 | 5.0 |
|---|---|---|---|
| -1 | Deprecated | Removed |
| (required) | No change | No change |
...
- The default value of
-1forbroker.idis effectively unused in KRaft mode. Ifnode.idis set, the synonym mechanism overwritesbroker.idwith the value ofnode.id. If neither is set,node.idvalidation fails with aConfigExceptionbefore the default is ever used. - The documentation describes
node.idas required in KRaft mode, but it can currently actually be omitted if currently ifbroker.idis set, because the synonym mechanism automatically populatesnode.idfrombroker.id. After the removal in 5.0,node.idmust 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.
Proposed Changes
Phase 1: Deprecation (Apache Kafka 4.
...
4)
- Log deprecation warning: When
broker.idis explicitly set in the server configuration, log a WARN-level message at startup:Code Block The 'broker.id' configuration is deprecated and will be removed in Apache Kafka 5.0. Please use 'node.id' instead.
- Preserve backward compatibility: The existing synonym mechanism will continue to function. Users who only set
broker.idwill still have it automatically copied tonode.id. The validation requiring both to be equal (if both are explicitly set) also remains unchanged.
...
Configuration | Current (4.0 ~ 4.2) | Phase 1: Deprecated (4.3 4 ~ 4.x) | Phase 2: Removed (5.0) |
|---|---|---|---|
Only | Valid | Valid | Valid |
Only | Valid; | Valid + |
|
Both set, same value | Valid | Valid + | Valid; |
Both set, different values |
|
| Valid; |
Neither set |
|
|
|
...
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.
...
4)
Unit tests to verify:
- A deprecation warning is logged when
broker.idis explicitly set (with or withoutnode.id). - Backward compatibility: setting only
broker.idstill works (existing tests inKafkaConfigTestalready create configs with onlybroker.idset).
...