ashmeet13 commented on PR #12988: URL: https://github.com/apache/kafka/pull/12988#issuecomment-1752128811
Got it @mjsax - Sharing the code that seems to be causing this bypass. Currently to fetch any consumer config i.e. `main`, `restore` or `global` we use a common function `getCommonConsumerConfigs` It's within the `getCommonConsumerConfigs` function where we check and override the configs preferred by streams - ```java private Map<String, Object> getCommonConsumerConfigs() { // Fetch all consumer props starting with "consumer." clientProvidedProps = getClientPropsWithPrefix(CONSUMER_PREFIX, ConsumerConfig.configNames()); // CLean out any properties that were set but need to be controlled by streams checkIfUnexpectedUserSpecifiedConfig(clientProvidedProps, NON_CONFIGURABLE_CONSUMER_DEFAULT_CONFIGS); checkIfUnexpectedUserSpecifiedConfig(clientProvidedProps, NON_CONFIGURABLE_CONSUMER_EOS_CONFIGS); // Create a config map of the preferred props and merge it with the cleaned props from above final consumerProps =new (eosEnabled ? CONSUMER_EOS_OVERRIDES : CONSUMER_DEFAULT_OVERRIDES); consumerProps.putAll(clientProvidedProps); } ``` And the logic within `getMainConsumerConfigs` is - ```java public Map<String, Object> getMainConsumerConfigs(...) { // Fetch the props starting with "consumer." after cleaning // any props that needed to be overwritten final consumerProps = getCommonConsumerConfigs(); // Get main consumer override props i.e. the ones // starting with "main.consumer." and merge the two maps. final mainConsumerProps = originalsWithPrefix(MAIN_CONSUMER_PREFIX); for (final entry: mainConsumerProps.entrySet()) { consumerProps.put(entry.getKey(), entry.getValue()); // Continue processing and filling in other required configs } ``` Do you think I've understood this piece correct? If so should a fix go for this within this PR itself? -- 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