Skip to content

Commit b84556e

Browse files
Revert 2 commits.
Signed-off-by: Sanghyeok An <[email protected]>
1 parent d38216b commit b84556e

File tree

2 files changed

+0
-30
lines changed

2 files changed

+0
-30
lines changed

spring-kafka/src/main/java/org/springframework/kafka/listener/AbstractMessageListenerContainer.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -475,28 +475,6 @@ public void setRecordInterceptor(@Nullable RecordInterceptor<K, V> recordInterce
475475
this.recordInterceptor = recordInterceptor;
476476
}
477477

478-
/**
479-
* Add an interceptor to be called before calling the record listener
480-
* If the {@link AbstractMessageListenerContainer} is not configured with a
481-
* {@link CompositeRecordInterceptor}, {@link CompositeRecordInterceptor} will be created internally
482-
* and configured to hold the added interceptor.
483-
* Does not apply to batch listeners.
484-
* @param recordInterceptor the interceptor.
485-
* @since 4.0
486-
*/
487-
public void addRecordInterceptor(RecordInterceptor<K, V> recordInterceptor) {
488-
if (this.recordInterceptor instanceof CompositeRecordInterceptor<K, V> compositeRecordInterceptor) {
489-
compositeRecordInterceptor.addRecordInterceptor(recordInterceptor);
490-
}
491-
else if (this.recordInterceptor == null) {
492-
this.recordInterceptor = new CompositeRecordInterceptor<>(recordInterceptor);
493-
}
494-
else {
495-
this.recordInterceptor = new CompositeRecordInterceptor<>(this.recordInterceptor,
496-
recordInterceptor);
497-
}
498-
}
499-
500478
protected @Nullable BatchInterceptor<K, V> getBatchInterceptor() {
501479
return this.batchInterceptor;
502480
}

spring-kafka/src/main/java/org/springframework/kafka/listener/CompositeRecordInterceptor.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,4 @@ public void afterRecord(ConsumerRecord<K, V> record, Consumer<K, V> consumer) {
9292
this.delegates.forEach(del -> del.afterRecord(record, consumer));
9393
}
9494

95-
/**
96-
* Add an {@link RecordInterceptor} to delegates.
97-
* @param recordInterceptor the interceptor.
98-
*/
99-
public void addRecordInterceptor(RecordInterceptor<K, V> recordInterceptor) {
100-
this.delegates.add(recordInterceptor);
101-
}
102-
10395
}

0 commit comments

Comments
 (0)