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
- The proposed changes does not require any changes to 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
- 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
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.