K - the key type.V - the value type.public class FilteringMessageListenerAdapter<K,V> extends AbstractFilteringMessageListener<K,V> implements MessageListener<K,V>
MessageListener adapter that implements filter logic
via a RecordFilterStrategy.| 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)
Executes when a
ConsumerRecord is received. |
filterpublic 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)
MessageListenerConsumerRecord is received.onMessage in interface MessageListener<K,V>consumerRecord - the ConsumerRecord to be processed.