Class CompositeRecordInterceptor<K,V>
- java.lang.Object
-
- org.springframework.kafka.listener.CompositeRecordInterceptor<K,V>
-
- Type Parameters:
K
- the key type.V
- the value type.
- All Implemented Interfaces:
RecordInterceptor<K,V>
public class CompositeRecordInterceptor<K,V> extends java.lang.Object implements RecordInterceptor<K,V>
ARecordInterceptor
that delegates to one or moreRecordInterceptor
in order.- Since:
- 2.3
- Author:
- Artem Bilan, Gary Russell
-
-
Constructor Summary
Constructors Constructor Description CompositeRecordInterceptor(RecordInterceptor<K,V>... delegates)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.kafka.clients.consumer.ConsumerRecord<K,V>
intercept(org.apache.kafka.clients.consumer.ConsumerRecord<K,V> record)
Perform some action on the record or return a different one.
-
-
-
Constructor Detail
-
CompositeRecordInterceptor
@SafeVarargs public CompositeRecordInterceptor(RecordInterceptor<K,V>... delegates)
-
-
Method Detail
-
intercept
public org.apache.kafka.clients.consumer.ConsumerRecord<K,V> intercept(org.apache.kafka.clients.consumer.ConsumerRecord<K,V> record)
Description copied from interface:RecordInterceptor
Perform some action on the record or return a different one. If null is returned the record will be skipped.- Specified by:
intercept
in interfaceRecordInterceptor<K,V>
- Parameters:
record
- the record.- Returns:
- the record or null.
-
-