Package org.apache.pulsar.io.kafka
Class KafkaAbstractSource<V>
java.lang.Object
org.apache.pulsar.io.kafka.KafkaPushSource<V>
org.apache.pulsar.io.kafka.KafkaAbstractSource<V>
- All Implemented Interfaces:
AutoCloseable,org.apache.pulsar.io.core.Source<V>
- Direct Known Subclasses:
KafkaBytesSource,KafkaStringSource
Simple Kafka Source to transfer messages from a Kafka topic.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PropertiesbeforeCreateConsumer(Properties props) abstract KafkaAbstractSource.KafkaRecordbuildRecord(org.apache.kafka.clients.consumer.ConsumerRecord<Object, Object> consumerRecord) voidclose()voidvoidstart()Methods inherited from class org.apache.pulsar.io.kafka.KafkaPushSource
consume, getQueueLength, notifyError, read
-
Constructor Details
-
KafkaAbstractSource
public KafkaAbstractSource()
-
-
Method Details
-
open
public void open(Map<String, Object> config, org.apache.pulsar.io.core.SourceContext sourceContext) throws Exception- Throws:
Exception
-
beforeCreateConsumer
-
close
- Throws:
InterruptedException
-
start
public void start() -
buildRecord
public abstract KafkaAbstractSource.KafkaRecord buildRecord(org.apache.kafka.clients.consumer.ConsumerRecord<Object, Object> consumerRecord)
-