OmniaGM commented on code in PR #16812: URL: https://github.com/apache/kafka/pull/16812#discussion_r1707024027
########## clients/src/main/java/org/apache/kafka/common/requests/ProduceRequest.java: ########## @@ -39,7 +39,42 @@ import static org.apache.kafka.common.requests.ProduceResponse.INVALID_OFFSET; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + public class ProduceRequest extends AbstractRequest { + public static final Logger log = LoggerFactory.getLogger(ProduceRequest.class); + + public static final String PRODUCE_REQUEST_PARSER_PROPERTY = "org.apache.kafka.common.requests.ProduceRequestParser"; + public static final String PRODUCE_REQUEST_PARSER_ENV = "KAFKA_PRODUCE_REQUEST_PARSER"; + public static final String PRODUCE_REQUEST_PARSER_DEFAULT = "org.apache.kafka.common.requests.DefaultProduceRequestParser"; + + private static ProduceRequestParser produceRequestParser = null; + static { + String produceRequestParserClassName = null; + try { + produceRequestParserClassName = System.getProperty(PRODUCE_REQUEST_PARSER_PROPERTY); + + if (null != produceRequestParserClassName) { + log.debug("ProduceRequestParser class {} from system property {}", produceRequestParserClassName, PRODUCE_REQUEST_PARSER_PROPERTY); + } else { + produceRequestParserClassName = System.getenv(PRODUCE_REQUEST_PARSER_ENV); Review Comment: Majority of Kafka config doesn't use env variables. Please check `KafkaConfig.scala` if you want to add a config to broker side -- 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. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org