rondagostino commented on a change in pull request #10093: URL: https://github.com/apache/kafka/pull/10093#discussion_r573743587
########## File path: tests/kafkatest/services/kafka/kafka.py ########## @@ -171,35 +347,79 @@ def __init__(self, context, num_nodes, zk, security_protocol=SecurityConfig.PLAI # e.g. brokers to deregister after a hard kill. self.zk_session_timeout = zk_session_timeout - self.port_mappings = { - 'PLAINTEXT': KafkaListener('PLAINTEXT', 9092, 'PLAINTEXT', False), - 'SSL': KafkaListener('SSL', 9093, 'SSL', False), - 'SASL_PLAINTEXT': KafkaListener('SASL_PLAINTEXT', 9094, 'SASL_PLAINTEXT', False), - 'SASL_SSL': KafkaListener('SASL_SSL', 9095, 'SASL_SSL', False), + broker_only_port_mappings = { KafkaService.INTERBROKER_LISTENER_NAME: - KafkaListener(KafkaService.INTERBROKER_LISTENER_NAME, 9099, None, False) + KafkaListener(KafkaService.INTERBROKER_LISTENER_NAME, config_property.FIRST_BROKER_PORT + 7, None, False) Review comment: This is calculating the port for the inter-broker listener. The mapping from security protocol to port is as shown below. This change is simply a rewrite of an existing hard-coded number (9099) to a calculation (9092 + 7). There is no issue regardless of the number of brokers. ``` Client listener when using SecurityConfig.PLAINTEXT ==> 9092 Client listener when using SecurityConfig.SS ==> 9093 Client listener when using SecurityConfig.SASL_PLAINTEXT ==> 9094 Client listener when using SecurityConfig.SASL_SSL ==> 9095 Inter-broker listener (and whatever security protocol it is set to) ==> 9092 + 7 = 9099 ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org