In StrimziKafkaContainer the inter-broker listener configuration loops over networks to create one listener per network. However, since the TLS enhancement changed advertised addresses from container IPs to network aliases (NETWORK_ALIAS_PREFIX + nodeId), the network loop variable is no longer used inside the loop body.
With old approach (i.e., container IPs) we needed to have separate listeners per network because each network had a different IP and you had to advertise each one. With DNS aliases one listener should be fine :).
So to imagine current behaviour is:
for (ContainerNetwork network : networks) {
String advertisedName = "BROKER" + listenerNumber;
advertisedListeners.append(",")
.append(advertisedName)
.append("://")
.append(NETWORK_ALIAS_PREFIX).append(this.nodeId)
.append(":")
.append(portNumber);
advertisedListenersNames.add(advertisedName);
listenerNumber++;
portNumber--;
}
and simplify version should be:
String advertisedName = "BROKER1";
advertisedListeners.append(",")
.append(advertisedName)
.append("://")
.append(NETWORK_ALIAS_PREFIX).append(this.nodeId)
.append(":")
.append(INTER_BROKER_LISTENER_PORT);
advertisedListenersNames.add(advertisedName);
In StrimziKafkaContainer the inter-broker listener configuration loops over networks to create one listener per network. However, since the TLS enhancement changed advertised addresses from container IPs to network aliases
(NETWORK_ALIAS_PREFIX + nodeId), the network loop variable is no longer used inside the loop body.With old approach (i.e., container IPs) we needed to have separate listeners per network because each network had a different IP and you had to advertise each one. With DNS aliases one listener should be fine :).
So to imagine current behaviour is:
and simplify version should be: