C0urante commented on a change in pull request #11986:
URL: https://github.com/apache/kafka/pull/11986#discussion_r841016535



##########
File path: 
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerConfig.java
##########
@@ -366,6 +369,29 @@ public WorkerConfig(ConfigDef definition, Map<String, 
String> props) {
         super(definition, props);
         logInternalConverterRemovalWarnings(props);
         logPluginPathConfigProviderWarning(props);
+        ignoreSubConfigs();
+    }
+
+    private void ignoreSubConfigs() {
+        subConfigPrefixes().forEach(this::ignoreAllWithPrefixes);
+        Arrays.asList(
+                KEY_CONVERTER_CLASS_CONFIG, VALUE_CONVERTER_CLASS_CONFIG, 
HEADER_CONVERTER_CLASS_CONFIG
+        ).forEach(this::ignore);
+    }
+
+    protected List<String> subConfigPrefixes() {
+        return new ArrayList<>(Arrays.asList(
+                KEY_CONVERTER_CLASS_CONFIG + ".",
+                VALUE_CONVERTER_CLASS_CONFIG + ".",
+                HEADER_CONVERTER_CLASS_CONFIG + ".",

Review comment:
       We could potentially replace this with actual instantiation and 
configuration of the key, value, and header converters specified in the worker 
config, but that may be wasteful of resources (especially since the `Converter` 
interface doesn't extend `Closeable` yet) and it's unclear how we'd want to 
handle failures encountered during that process (aborting worker startup is not 
an option as converter instantiation may fail due to transient errors).




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