Current state: Accepted

Discussion thread: here (not that there is an old discussion thread here)

JIRA: here

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


Currently with Kafka you cannot have duplicate listeners on the same port. This makes sense when you only have a single IP stack but since we now have both IPv4 and IPv6 there is no reason why you cannot have an IPv4 address and another IPv6 address on the same port.

Note that this change only applies to listeners, advertised listeners already have this feature.

Public Interfaces

  • The proposed changes does create any breaking changes in public interfaces. There are however changes that are done to the semantics of the listener configuration, i.e. the following configuration examples

Are now considered valid which means that Kafka will attempt to start with such configurations rather than short circuiting with an error. Specifically this means if and only if you have 2 listeners on the same port and one is IPv4 and the other is IPv6 then this is considered an accepted listener configuration.

Proposed Changes

In summary the proposed changes involve loosening the validation on listenerListToEndPoints in kafka.utils.CoreUtils.scala so that duplicates ports are allowed if and only if

  • The hosts are valid IP's (i.e. not DNS hostnames)
  • There are only 2 hosts that share the same port
  • One address is an IPv4 and the other is an IPv6

Apart from adding some extra information that gets thrown when the validation in listenerListToEndPoints  fails there are no changes outside of this specific case.

Examples of listener configurations which will pass the validation proposed in this KIP


And here are examples of listener configurations which will fail the validation (i.e. no change in behavior)


Compatibility, Deprecation, and Migration Plan

  • There won't be any impact on current users, the proposal strictly involves adding new behavior and its not possible for current users to run Kafka on this newly proposed behavior since it would fail validation.

Rejected Alternatives

As far as I am aware there aren't any rejected alternatives.

  • No labels