K
- the key type.V
- the value type.public class FilteringMessageListenerAdapter<K,V> extends AbstractFilteringMessageListener<K,V,MessageListener<K,V>> implements MessageListener<K,V>
MessageListener
adapter that implements filter logic
via a RecordFilterStrategy
.ConsumerSeekAware.ConsumerSeekCallback
delegate, logger
Constructor and Description |
---|
FilteringMessageListenerAdapter(MessageListener<K,V> delegate,
RecordFilterStrategy<K,V> recordFilterStrategy)
Create an instance with the supplied strategy and delegate listener.
|
Modifier and Type | Method and Description |
---|---|
void |
onMessage(org.apache.kafka.clients.consumer.ConsumerRecord<K,V> consumerRecord)
Invoked with data from kafka.
|
filter
onIdleContainer, onPartitionsAssigned, registerSeekCallback
public FilteringMessageListenerAdapter(MessageListener<K,V> delegate, RecordFilterStrategy<K,V> recordFilterStrategy)
delegate
- the delegate.recordFilterStrategy
- the filter.public void onMessage(org.apache.kafka.clients.consumer.ConsumerRecord<K,V> consumerRecord)
GenericMessageListener
onMessage
in interface GenericMessageListener<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>>
consumerRecord
- the data to be processed.