use of org.apache.rya.indexing.pcj.fluo.app.export.kafka.KryoVisibilityBindingSetSerializer in project incubator-rya by apache.
the class KafkaLatencyBenchmark method updateStatsFromKafka.
private void updateStatsFromKafka(final String topic) {
try (KafkaConsumer<String, VisibilityBindingSet> consumer = new KafkaConsumer<>(options.getKafkaConsumerProperties(), new StringDeserializer(), new KryoVisibilityBindingSetSerializer())) {
consumer.subscribe(Arrays.asList(topic));
while (!futureList.isEmpty()) {
// check kafka at most twice a second.
final ConsumerRecords<String, VisibilityBindingSet> records = consumer.poll(500);
handle(records);
}
} catch (final Exception e) {
logger.warn("Exception occurred", e);
}
}
Aggregations