Versions Compared

Key

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

...

Current state: Under Discussion

Discussion thread: None

JIRA: JiraserverASF JIRAserverId5aa69414-a9e9-3523-82ec-879b028fb15bkeyKAFKA-18628

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

...

Motivation

Since

...

Apache

...

Kafka

...

4.0,

...

ZooKeeper

...

has

...

been

...

removed

...

and

...

KRaft

...

is

...

the

...

only

...

supported

...

mode

...

(

...

KIP-500

...

).

...

In

...

KRaft

...

mode,

...

a

...

single

...

process

...

can

...

serve

...

as

...

a

...

broker,

...

a

...

controller,

...

or

...

both.

...

KIP-631

...

therefore

...

introduced

...

node.id

...

to

...

replace

...

broker.id

...

as

...

the

...

canonical

...

node

...

identifier.

However,

...

the

...

legacy

...

broker.id

...

configuration

...

still

...

exists

...

and

...

is

...

treated

...

as

...

a

...

synonym

...

of

...

node.id

...

.

...

If

...

only

...

one

...

is

...

set,

...

the

...

other

...

is

...

automatically

...

populated

...

with

...

the

...

same

...

value.

...

If

...

both

...

are

...

explicitly

...

set,

...

they

...

must

...

be

...

equal;

...

otherwise,

...

a

...

ConfigException

...

is

...

thrown.

Having

...

two

...

configuration

...

properties

...

that

...

must

...

always

...

hold

...

the

...

same

...

value

...

causes

...

unnecessary

...

confusion.

...

The

...

documentation

...

describes

...

node.id

...

as

...

required

...

in

...

KRaft

...

mode,

...

yet

...

the

...

synonym

...

mechanism

...

allows

...

users

...

to

...

omit

...

node.id

...

entirely

...

if

...

broker.id

...

is

...

set,

...

contradicting

...

the

...

documented

...

requirement.

Related

...

ZooKeeper-era

...

configurations

...

such

...

as

...

broker.id.generation.enable

...

and

...

reserved.broker.max.id

...

were

...

already

...

removed

...

in

...

Kafka

...

4.0,

...

making

...

broker.id

...

the

...

only

...

remaining

...

legacy

...

identifier

...

config.

...

We

...

should

...

deprecate

...

it

...

to

...

simplify

...

the

...

configuration

...

surface

...

and

...

guide

...

all

...

users

...

toward

...

the

...

single,

...

canonical

...

configuration:

...

node.id

...

.

...

Public

...

Interfaces

This

...

KIP

...

proposes

...

to

...

deprecate

...

the

...

broker.id

...

server

...

configuration

...

property

...

in

...

Apache

...

Kafka

...

4.3

...

and

...

remove

...

it

...

in

...

Apache

...

Kafka

...

5.0.

...

Config

...

Type

...

Default

...

4.3

...

5.0

...

...

broker.id

...

INT

-1

...

Deprecated

Removed

node.id

...

INT

(required)

...

No

...

change

...

No

...

change

...

Note:

...

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.

No

...

changes

...

to

...

public

...

APIs,

...

network

...

protocols,

...

metrics,

...

or

...

command-line

...

tools.

...

Proposed

...

Changes

...

Phase

...

1:

...

Deprecation

...

(Apache

...

Kafka

...

4.3)

...

  1. Log

...

  1. deprecation

...

  1. warning

...

  1. :

...

  1. When

...

  1. broker.id

...

  1. is

...

  1. explicitly

...

  1. set

...

  1. in

...

  1. the

...

  1. server

...

  1. configuration,

...

  1. log

...

  1. a

...

  1. WARN-level

...

  1. message

...

  1. at

...

  1. startup:

    ...

    Code Block

...

  1. The 'broker.id' configuration is deprecated and will be removed in Apache Kafka 5.0. Please use 'node.id' instead.
    

...

  1. Preserve

...

  1. backward

...

  1. compatibility

...

  1. :

...

  1. The

...

  1. existing

...

  1. synonym

...

  1. mechanism

...

  1. will

...

  1. continue

...

  1. to

...

  1. function.

...

  1. Users

...

  1. who

...

  1. only

...

  1. set

...

  1. broker.id

...

  1. will

...

  1. still

...

  1. have

...

  1. it

...

  1. automatically

...

  1. copied

...

  1. to

...

  1. node.id

...

  1. .

...

  1. The

...

  1. validation

...

  1. requiring

...

  1. both

...

  1. to

...

  1. be

...

  1. equal

...

  1. (if

...

  1. both

...

  1. are

...

  1. explicitly

...

  1. set)

...

  1. also

...

  1. remains

...

  1. unchanged.

...

Phase

...

2:

...

Removal

...

(Apache

...

Kafka

...

5.0)

...

  1. Remove

...

  1. broker.id

...

  1. configuration

...

  1. :

...

  1. The

...

  1. BROKER_ID_CONFIG

...

  1. will

...

  1. be

...

  1. removed

...

  1. from

...

  1. ServerConfigs

...

  1. .

...

  1. Setting

...

  1. it

...

  1. will

...

  1. result

...

  1. in

...

  1. an

...

  1. unknown

...

  1. configuration

...

  1. warning.

...

  1. Remove

...

  1. synonym

...

  1. logic

...

  1. :

...

  1. Remove

...

  1. the

...

  1. broker.id

...

  1. /

...

  1. node.id

...

  1. synonym

...

  1. handling

...

  1. from

...

  1. AbstractKafkaConfig.populateSynonyms()

...

  1. .

...

  1. Retain

...

  1. internal

...

  1. brokerId()

...

  1. accessor

...

  1. :

...

  1. The

...

  1. brokerId()

...

  1. method

...

  1. will

...

  1. continue

...

  1. to

...

  1. exist

...

  1. for

...

  1. internal

...

  1. use,

...

  1. delegating

...

  1. to

...

  1. nodeId()

...

  1. .

...

Behavior

...

Matrix

The

...

following

...

table

...

summarizes

...

the

...

expected

...

behavior

...

for

...

each

...

configuration

...

scenario

...

across

...

version

...

ranges:

...

Configuration

...

4.0

...

~

...

4.2

...

(Current)

...

4.3

...

~

...

4.x

...

(Deprecated)

...

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

...

with

...

unknown

...

config

...

warning

...

...

Both

...

set,

...

different

...

values

ConfigException: node.id

...

must

...

equal

...

broker.id

...

ConfigException: node.id

...

must

...

equal

...

broker.id

...

Valid;

...

broker.id

...

is

...

ignored

...

with

...

unknown

...

config

...

warning

...

...

Neither

...

set

...

ConfigException

...

:

...

node.id

...

is

...

required

ConfigException: node.id

...

is

...

required

...

ConfigException

...

:

...

node.id

...

is

...

required

...

...

Compatibility,

...

Deprecation,

...

and

...

Migration

...

Plan

...

Migration

...

Steps

Users

...

should

...

replace

...

broker.id

...

with

...

node.id

...

in

...

their

...

server

...

configuration.

...

If

...

both

...

are

...

configured,

...

simply

...

remove

...

broker.id

...

.

...

Test

...

Plan

...

Phase

...

1:

...

Deprecation

...

(Apache

...

Kafka

...

4.3)

Unit

...

tests

...

to

...

verify:

...

  • A

...

  • deprecation

...

  • warning

...

  • is

...

  • logged

...

  • when

...

  • broker.id

...

  • is

...

  • explicitly

...

  • set

...

  • (with

...

  • or

...

  • without

...

  • node.id

...

  • ).

...

  • Backward

...

  • compatibility:

...

  • setting

...

  • only

...

  • broker.id

...

  • still

...

  • works

...

  • (existing

...

  • tests

...

  • in

...

  • KafkaConfigTest

...

  • already

...

  • create

...

  • configs

...

  • with

...

  • only

...

  • broker.id

...

  • set).

...

Phase

...

2:

...

Removal

...

(Apache

...

Kafka

...

5.0)

Unit

...

tests

...

to

...

verify:

...

  • 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

...

None.

...

References