File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
spring-kafka/src/main/java/org/springframework/kafka/listener Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -694,10 +694,10 @@ private boolean determineCommitCurrent(Properties consumerProperties) {
694694 return true ;
695695 }
696696 String autoOffsetReset = consumerProperties .getProperty (ConsumerConfig .AUTO_OFFSET_RESET_CONFIG );
697- return ! this . autoCommit
698- && ( autoOffsetReset == null || autoOffsetReset . equals ("latest" ) )
699- && ( AssignmentCommitOption .LATEST_ONLY .equals (this .autoCommitOption )
700- || AssignmentCommitOption . LATEST_ONLY_NO_TX . equals ( this .autoCommitOption )) ;
697+ boolean resetLatest = autoOffsetReset == null || autoOffsetReset . equals ( "latest" );
698+ boolean latestOnlyOption = AssignmentCommitOption . LATEST_ONLY . equals (this . autoCommitOption )
699+ || AssignmentCommitOption .LATEST_ONLY_NO_TX .equals (this .autoCommitOption );
700+ return ! this .autoCommit && resetLatest && latestOnlyOption ;
701701 }
702702
703703 private long obtainMaxPollInterval (Properties consumerProperties ) {
You can’t perform that action at this time.
0 commit comments