m1a2st commented on code in PR #16899:
URL: https://github.com/apache/kafka/pull/16899#discussion_r1747059604


##########
clients/src/main/java/org/apache/kafka/common/config/AbstractConfig.java:
##########
@@ -355,6 +355,14 @@ public Map<String, Object> 
valuesWithPrefixAllOrNothing(String prefix) {
         return nonInternalConfigs;
     }
 
+    protected void clearConfig(String key) {
+        Object value = values.get(key);
+        if (value instanceof Number)
+            values.put(key, 0);
+        else
+            values.remove(key);
+    }

Review Comment:
   I found that `session.timeout.ms` config should not be empty,  when create 
the consumer, I am not sure it's a bug or not.
   when clearConfig method like, it would throw an error about 
   ```java
       protected void clearConfig(String key) {
               values.remove(key);
       }
   ```
   ```
   Unknown configuration 'session.timeout.ms'
   org.apache.kafka.common.config.ConfigException: Unknown configuration 
'session.timeout.ms'
   ```
   To avoid this case, I transfer the value to zero.



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