Status

Current state: Under discussion

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).

Motivation

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

Proposed Changes

A tested PR of the proposed changes is available here https://github.com/apache/kafka/pull/11478.

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

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

Compatibility, Deprecation, and Migration Plan

Rejected Alternatives

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