diff --git a/spring-kafka/src/main/java/org/springframework/kafka/config/AbstractKafkaListenerEndpoint.java b/spring-kafka/src/main/java/org/springframework/kafka/config/AbstractKafkaListenerEndpoint.java index 5486861a9a..4b7cf8c97c 100644 --- a/spring-kafka/src/main/java/org/springframework/kafka/config/AbstractKafkaListenerEndpoint.java +++ b/spring-kafka/src/main/java/org/springframework/kafka/config/AbstractKafkaListenerEndpoint.java @@ -327,7 +327,6 @@ public void setReplyTemplate(KafkaTemplate replyTemplate) { @SuppressWarnings("unchecked") public void setRecordFilterStrategy(RecordFilterStrategy recordFilterStrategy) { this.recordFilterStrategy = (RecordFilterStrategy) recordFilterStrategy; - setAckDiscarded(true); } protected boolean isAckDiscarded() { @@ -335,7 +334,7 @@ protected boolean isAckDiscarded() { } /** - * Set to true if the {@link #setRecordFilterStrategy(RecordFilterStrategy)} is in use. + * Set to true if the {@link #setRecordFilterStrategy(RecordFilterStrategy)} should ack discarded messages. * @param ackDiscarded the ackDiscarded. */ public void setAckDiscarded(boolean ackDiscarded) {