Package io.confluent.parallelconsumer
Interface JStreamParallelStreamProcessor<K,V>
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable,DrainingCloseable
- All Known Implementing Classes:
JStreamParallelEoSStreamProcessor
public interface JStreamParallelStreamProcessor<K,V> extends DrainingCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.confluent.parallelconsumer.DrainingCloseable
DrainingCloseable.DrainingMode -
Field Summary
-
Method Summary
Modifier and Type Method Description static <KK, VV> JStreamParallelStreamProcessor<KK,VV>createJStreamEosStreamProcessor(ParallelConsumerOptions options)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 interface io.confluent.parallelconsumer.DrainingCloseable
close, close, closeDontDrainFirst, closeDontDrainFirst, closeDrainFirst, closeDrainFirst, workRemaining
-
Method Details
-
createJStreamEosStreamProcessor
static <KK, VV> JStreamParallelStreamProcessor<KK,VV> createJStreamEosStreamProcessor(ParallelConsumerOptions options) -
pollProduceAndStream
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.- Returns:
- a stream of results of applying the function to the polled records
-