public class PulsarRecordEmitter<T> extends Object implements RecordEmitter<PulsarMessage<T>,T,PulsarPartitionSplitState>
RecordEmitter
implementation for both PulsarOrderedSourceReader
and PulsarUnorderedSourceReader
. We would always update the last consumed message id in this
emitter.Constructor and Description |
---|
PulsarRecordEmitter() |
Modifier and Type | Method and Description |
---|---|
void |
emitRecord(PulsarMessage<T> element,
SourceOutput<T> output,
PulsarPartitionSplitState splitState)
Process and emit the records to the
SourceOutput . |
public void emitRecord(PulsarMessage<T> element, SourceOutput<T> output, PulsarPartitionSplitState splitState) throws Exception
RecordEmitter
SourceOutput
. A few recommendations to the
implementation are following:
emitRecord
in interface RecordEmitter<PulsarMessage<T>,T,PulsarPartitionSplitState>
element
- The intermediate element read by the SplitReader.output
- The output to which the final records are emit to.splitState
- The state of the split.Exception
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.