mjsax commented on a change in pull request #10482: URL: https://github.com/apache/kafka/pull/10482#discussion_r610829339
########## File path: streams/src/main/java/org/apache/kafka/streams/StreamsConfig.java ########## @@ -1014,6 +1015,23 @@ protected StreamsConfig(final Map<?, ?> props, if (props.containsKey(RETRIES_CONFIG)) { log.warn("Configuration parameter `{}` is deprecated and will be removed in 3.0.0 release.", RETRIES_CONFIG); } + + if (eosEnabled) { + verifyEOSTransactionTimeoutCompatibility(); + } + } + + private void verifyEOSTransactionTimeoutCompatibility() { + final long commitInterval = (long) originals().getOrDefault(COMMIT_INTERVAL_MS_CONFIG, EOS_DEFAULT_COMMIT_INTERVAL_MS); Review comment: In the explicit cast required? ########## File path: streams/src/main/java/org/apache/kafka/streams/StreamsConfig.java ########## @@ -1014,6 +1015,23 @@ protected StreamsConfig(final Map<?, ?> props, if (props.containsKey(RETRIES_CONFIG)) { log.warn("Configuration parameter `{}` is deprecated and will be removed in 3.0.0 release.", RETRIES_CONFIG); } + + if (eosEnabled) { + verifyEOSTransactionTimeoutCompatibility(); + } + } + + private void verifyEOSTransactionTimeoutCompatibility() { + final long commitInterval = (long) originals().getOrDefault(COMMIT_INTERVAL_MS_CONFIG, EOS_DEFAULT_COMMIT_INTERVAL_MS); + final long transactionTimeout = Long.valueOf((int) originals().getOrDefault(PRODUCER_PREFIX + ProducerConfig.TRANSACTION_TIMEOUT_CONFIG, DEFAULT_TRANSACTION_TIMEOUT)); Review comment: It might be simpler to just use `int transactionTimeout` -- Java will auto-cast to long in ``` if (transactionTimeout < commitInterval) { ``` -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org