Fleshgrinder commented on a change in pull request #9369: URL: https://github.com/apache/kafka/pull/9369#discussion_r508641877
########## File path: streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java ########## @@ -361,7 +363,7 @@ public static StreamThread create(final InternalTopologyBuilder builder, final AtomicLong nextScheduledRebalanceMs = new AtomicLong(Long.MAX_VALUE); consumerConfigs.put(StreamsConfig.InternalConfig.NEXT_SCHEDULED_REBALANCE_MS, nextScheduledRebalanceMs); - final String originalReset = (String) consumerConfigs.get(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG); + final String originalReset = OffsetResetStrategy.forName((String) consumerConfigs.get(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG)).toString(); Review comment: The value could be in any format: `LaTeSt`, `latest`, `LATEST`, … but we are interested only in its canonical form and the canonical form is provided through the Enum, hence, we have to parse it again. The alternative would be to call `toLowerCase(Locale.ROOT)` on it but we would effectively be duplicating the logic and that's very bad. Ideal would actually be if our configuration is not giving us a string but rather the Enum member that was configured but I think we all know the our configuration is generally not ideal, so that's an issue for another time. ---------------------------------------------------------------- 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