Interface RecordInterceptor<K,V>
-
- Type Parameters:
K
- the key type.V
- the value type.
- All Known Implementing Classes:
CompositeRecordInterceptor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface RecordInterceptor<K,V>
An interceptor forConsumerRecord
invoked by the listener container before invoking the listener.- Since:
- 2.2.7
- Author:
- Gary Russell
-
-
Method Summary
All Methods Instance Methods Abstract 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.
-
-
-
Method Detail
-
intercept
@Nullable 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. If null is returned the record will be skipped.- Parameters:
record
- the record.- Returns:
- the record or null.
-
-