OmniaGM commented on code in PR #16812:
URL: https://github.com/apache/kafka/pull/16812#discussion_r1707097512


##########
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:
   Not that I'm aware of, also if you need this config to be dynamic we have 
DynamicBrokerConfig which depends on KafkaConfig.  
   
   I would suggest that you open a KIP for discussion with a clear motivation 
for why you think this feature is important which is the most important part 
then the community can discuss the technical proposal of how would these config 
get loaded on the mailing list. 



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

Reply via email to