Package io.deephaven.kafka.ingest
Interface ConsumerRecordToTableWriterAdapter
- All Known Implementing Classes:
GenericRecordConsumerRecordToTableWriterAdapter,JsonConsumerRecordToTableWriterAdapter,PojoConsumerRecordToTableWriterAdapter,ProtobufConsumerRecordToTableWriterAdapter,SimpleConsumerRecordToTableWriterAdapter
- 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 ConsumerRecordToTableWriterAdapter
Converter from a stream of Kafka records to a table writer.
Typically, this should be created by a factory that takes a
TableWriter as its input.-
Method Summary
Modifier and Type Method Description voidconsumeRecord(org.apache.kafka.clients.consumer.ConsumerRecord<?,?> record)Consume a Kafka record, producing zero or more rows in the output.
-
Method Details
-
consumeRecord
void consumeRecord(org.apache.kafka.clients.consumer.ConsumerRecord<?,?> record) throws IOExceptionConsume a Kafka record, producing zero or more rows in the output.- Parameters:
record- the record received fromKafkaConsumer.poll(Duration).- Throws:
IOException- if there was an error writing to the output table
-