Status

Current state: Under Discussion

Discussion thread: here [Change the link from the KIP proposal email archive to your own email thread]

JIRA: KAFKA-10713

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

Motivation

This KIP concerns the following configs, but we'll talk about bootstrap.servers for concreteness.

The client bootstrap.servers config is documented as being a list of host:port pairs (comma separated, as with other configs of LIST type). However, that differs from how this config is actually validated, which allows a protocol part to be included. The protocol part is never used, only the host and port, as obtained using the non-public Utils.getHost and Utils.getPort methods. This can be confusing in a number of ways:

We should tighten up what is accepted by Utils.getHost and Utils.getPort so that a protocol is not accepted.

Public Interfaces

No changes, since the implementation of validation for `bootstrap.servers` will be aligned with the existing documentation.

Proposed Changes

Remove the .*? from the pattern in Utils.HOST_PORT_PATTERN.

Compatibility, Deprecation, and Migration Plan

Any configs listed in the motivation section which currently include a protocol will become invalid. Users will have to remove the protocol from their configs if they have included one. Since this is a breaking change it will be implemented in Kafka 3.0 to minimise surprises.

Rejected Alternatives