Package io.confluent.parallelconsumer
Class JStreamParallelEoSStreamProcessor<K,V>
java.lang.Object
io.confluent.parallelconsumer.ParallelEoSStreamProcessor<K,V>
io.confluent.parallelconsumer.JStreamParallelEoSStreamProcessor<K,V>
- All Implemented Interfaces:
DrainingCloseable,JStreamParallelStreamProcessor<K,V>,ParallelConsumer<K,V>,ParallelStreamProcessor<K,V>,java.io.Closeable,java.lang.AutoCloseable,org.apache.kafka.clients.consumer.ConsumerRebalanceListener
public class JStreamParallelEoSStreamProcessor<K,V> extends ParallelEoSStreamProcessor<K,V> implements JStreamParallelStreamProcessor<K,V>
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.confluent.parallelconsumer.DrainingCloseable
DrainingCloseable.DrainingModeNested classes/interfaces inherited from interface io.confluent.parallelconsumer.ParallelConsumer
ParallelConsumer.Tuple<L,R>Nested classes/interfaces inherited from interface io.confluent.parallelconsumer.ParallelStreamProcessor
ParallelStreamProcessor.ConsumeProduceResult<K,V,KK,VV> -
Field Summary
Fields inherited from class io.confluent.parallelconsumer.ParallelEoSStreamProcessor
MDC_INSTANCE_ID, wm -
Constructor Summary
Constructors Constructor Description JStreamParallelEoSStreamProcessor(ParallelConsumerOptions parallelConsumerOptions) -
Method Summary
Modifier and Type Method Description java.util.stream.Stream<ParallelStreamProcessor.ConsumeProduceResult<K,V,K,V>>pollProduceAndStream(java.util.function.Function<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>,java.util.List<org.apache.kafka.clients.producer.ProducerRecord<K,V>>> userFunction)LikeParallelEoSStreamProcessor.pollAndProduceMany(java.util.function.Function<org.apache.kafka.clients.consumer.ConsumerRecord<K, V>, java.util.List<org.apache.kafka.clients.producer.ProducerRecord<K, V>>>, java.util.function.Consumer<io.confluent.parallelconsumer.ParallelStreamProcessor.ConsumeProduceResult<K, V, K, V>>)but instead of callbacks, streams the results instead, after the produce result is ack'd by Kafka.Methods inherited from class io.confluent.parallelconsumer.ParallelEoSStreamProcessor
addToMailbox, addToMailBoxOnUserFunctionSuccess, close, close, getFailureCause, getNumberOfAssignedPartitions, getTimeBetweenCommits, isClosedOrFailed, onPartitionsAssigned, onPartitionsLost, onPartitionsRevoked, onUserFunctionSuccess, poll, pollAndProduce, pollAndProduce, pollAndProduceMany, pollAndProduceMany, requestCommitAsap, setLongPollTimeout, setMyId, setTimeBetweenCommits, subscribe, subscribe, subscribe, subscribe, supervisorLoop, userFunctionRunner, waitForProcessedNotCommitted, workRemainingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.confluent.parallelconsumer.DrainingCloseable
close, close, closeDontDrainFirst, closeDontDrainFirst, closeDrainFirst, closeDrainFirst, workRemaining
-
Constructor Details
-
Method Details
-
pollProduceAndStream
public java.util.stream.Stream<ParallelStreamProcessor.ConsumeProduceResult<K,V,K,V>> pollProduceAndStream(java.util.function.Function<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>,java.util.List<org.apache.kafka.clients.producer.ProducerRecord<K,V>>> userFunction)Description copied from interface:JStreamParallelStreamProcessorLikeParallelEoSStreamProcessor.pollAndProduceMany(java.util.function.Function<org.apache.kafka.clients.consumer.ConsumerRecord<K, V>, java.util.List<org.apache.kafka.clients.producer.ProducerRecord<K, V>>>, java.util.function.Consumer<io.confluent.parallelconsumer.ParallelStreamProcessor.ConsumeProduceResult<K, V, K, V>>)but instead of callbacks, streams the results instead, after the produce result is ack'd by Kafka.- Specified by:
pollProduceAndStreamin interfaceJStreamParallelStreamProcessor<K,V>- Returns:
- a stream of results of applying the function to the polled records
-