OmniaGM commented on code in PR #15999: URL: https://github.com/apache/kafka/pull/15999#discussion_r1664129210
########## connect/mirror/src/main/java/org/apache/kafka/connect/mirror/MirrorSourceConnector.java: ########## @@ -234,6 +234,30 @@ public ConfigDef config() { @Override public org.apache.kafka.common.config.Config validate(Map<String, String> props) { List<ConfigValue> configValues = super.validate(props).configValues(); + validateExactlyOnceConfigs(props, configValues); + validateEmitOffsetSyncConfigs(props, configValues); + + return new org.apache.kafka.common.config.Config(configValues); + } + + private static void validateEmitOffsetSyncConfigs(Map<String, String> props, List<ConfigValue> configValues) { + boolean offsetSyncsConfigured = props.keySet().stream() + .anyMatch(conf -> conf.startsWith(OFFSET_SYNCS_CLIENT_ROLE_PREFIX) || conf.startsWith(OFFSET_SYNCS_TOPIC_CONFIG_PREFIX)); + + if ("false".equals(props.get(MirrorConnectorConfig.EMIT_OFFSET_SYNCS_ENABLED)) && offsetSyncsConfigured) { Review Comment: No, because `offsetSyncsConfigured` has default which is the global configs for topics and clients -- 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