Interface ParallelConsumer<K,V>
- Type Parameters:
K- key consume / produce key typeV- value consume / produce value type
- All Superinterfaces:
AutoCloseable,Closeable,DrainingCloseable
- All Known Subinterfaces:
ParallelStreamProcessor<K,V>
- All Known Implementing Classes:
AbstractParallelEoSStreamProcessor,ExternalEngine,JStreamParallelEoSStreamProcessor,ParallelEoSStreamProcessor
Currently there is no direct implementation, only the ParallelStreamProcessor version (see AbstractParallelEoSStreamProcessor), but there may be in the future.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classA simple tuple structure.Nested classes/interfaces inherited from interface io.confluent.parallelconsumer.internal.DrainingCloseable
DrainingCloseable.DrainingMode -
Field Summary
Fields inherited from interface io.confluent.parallelconsumer.internal.DrainingCloseable
DEFAULT_TIMEOUT -
Method Summary
Modifier and TypeMethodDescriptionvoidPause this consumer (i.e.voidResume this consumer (i.e.voidsubscribe(Collection<String> topics) voidsubscribe(Collection<String> topics, org.apache.kafka.clients.consumer.ConsumerRebalanceListener callback) voidvoidMethods inherited from interface io.confluent.parallelconsumer.internal.DrainingCloseable
close, close, closeDontDrainFirst, closeDontDrainFirst, closeDrainFirst, closeDrainFirst, workRemaining
-
Method Details
-
subscribe
- See Also:
-
KafkaConsumer.subscribe(Collection)
-
subscribe
- See Also:
-
KafkaConsumer.subscribe(Pattern)
-
subscribe
void subscribe(Collection<String> topics, org.apache.kafka.clients.consumer.ConsumerRebalanceListener callback) - See Also:
-
KafkaConsumer.subscribe(Collection, ConsumerRebalanceListener)
-
subscribe
void subscribe(Pattern pattern, org.apache.kafka.clients.consumer.ConsumerRebalanceListener callback) - See Also:
-
KafkaConsumer.subscribe(Pattern, ConsumerRebalanceListener)
-
pauseIfRunning
void pauseIfRunning()Pause this consumer (i.e. stop processing of messages).This operation only has an effect if the consumer is currently running. In all other cases calling this method will be silent a no-op.
Once the consumer is paused, the system will stop submitting work to the processing pool. Already submitted in flight work however will be finished. This includes work that is currently being processed inside a user function as well as work that has already been submitted to the processing pool but has not been picked up by a free worker yet.
General remarks:
- A paused consumer may still keep polling for new work until internal buffers are filled.
- This operation does not actively pause the subscription on the underlying Kafka Broker (compared to
KafkaConsumer#pause). - Pending offset commits will still be performed when the consumer is paused.
-
resumeIfPaused
void resumeIfPaused()Resume this consumer (i.e. continue processing of messages).This operation only has an effect if the consumer is currently paused. In all other cases calling this method will be a silent no-op.
-