C0urante commented on PR #12041:
URL: https://github.com/apache/kafka/pull/12041#issuecomment-1100583118

   Also worth noting that if we really do want to disable all unused config 
warnings for all (public) configs that Kafka defines, we could probably do this 
automatically instead of on a case-by-case basis.
   
   For example, in `KafkaConsumer`, we could modify the constructor:
   ```java
   public class KafkaConsumer<K, V> implements Consumer<K, V> {
       @SuppressWarnings("unchecked")
       KafkaConsumer(ConsumerConfig config, Deserializer<K> keyDeserializer, 
Deserializer<V> valueDeserializer) {
           try {
               // We don't use some properties in some cases; no need to log a 
warning to the user for them
               ConsumerConfig.configNames().forEach(config::ignore);
               // ...
           } catch (Throwable t) {
               // ...
           }
   }
   ```
   
   This would be easier to maintain and reduce noise in the code base related 
to config wrangling.


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