Package org.eso.ias.kafkautils
Class FilteredKafkaIasiosConsumer
java.lang.Object
org.eso.ias.kafkautils.SimpleKafkaIasiosConsumer
org.eso.ias.kafkautils.FilteredKafkaIasiosConsumer
- All Implemented Interfaces:
KafkaStringsConsumer.StringsConsumer
FilteredKafkaIasiosConsumer allows to set a custom filter on top of the Kafka consumer.
The filter implements the FilterIaValue interface.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
The filter to apply to IASValuesNested classes/interfaces inherited from class org.eso.ias.kafkautils.SimpleKafkaIasiosConsumer
SimpleKafkaIasiosConsumer.IasioListener
-
Field Summary
Fields inherited from class org.eso.ias.kafkautils.SimpleKafkaIasiosConsumer
seekIfOlderThan, SeekIfOlderThanProName
-
Constructor Summary
ConstructorDescriptionFilteredKafkaIasiosConsumer
(String servers, String topicName, String consumerID, FilteredKafkaIasiosConsumer.FilterIasValue filter) Constructor -
Method Summary
Methods inherited from class org.eso.ias.kafkautils.SimpleKafkaIasiosConsumer
getNumOfProcessedRecords, setUp, setUp, startGettingEvents, stringsReceived, tearDown
-
Constructor Details
-
FilteredKafkaIasiosConsumer
public FilteredKafkaIasiosConsumer(String servers, String topicName, String consumerID, FilteredKafkaIasiosConsumer.FilterIasValue filter) Constructor- Parameters:
servers
- The kafka servers to connect totopicName
- The name of the topic to get events fromconsumerID
- the ID of the consumerfilter
- The filter to apply to accept or discard IASValues
-
-
Method Details
-
accept
Accepts or rejects a IASValue against the filters, if set- Overrides:
accept
in classSimpleKafkaIasiosConsumer
- Parameters:
iasio
- The IASValue to accept or discard- Returns:
- true if the value is accpted; false otherwise
-