Class ReadKafkaTopicPartitionRange<K,V>
java.lang.Object
com.markosindustries.distroboy.kafka.ReadKafkaTopicPartitionRange<K,V>
- Type Parameters:
K
- The type of keys theKafkaConsumer
will deserialiseV
- The type of values theKafkaConsumer
will deserialise
- All Implemented Interfaces:
com.markosindustries.distroboy.core.operations.FlatMapOp<java.util.List<org.apache.kafka.common.TopicPartition>,org.apache.kafka.clients.consumer.ConsumerRecord<K,V>>
,com.markosindustries.distroboy.core.operations.ListOp<java.util.List<org.apache.kafka.common.TopicPartition>,org.apache.kafka.clients.consumer.ConsumerRecord<K,V>>
,com.markosindustries.distroboy.core.operations.Operation<java.util.List<org.apache.kafka.common.TopicPartition>,org.apache.kafka.clients.consumer.ConsumerRecord<K,V>,java.util.List<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>>>
public class ReadKafkaTopicPartitionRange<K,V>
extends java.lang.Object
implements com.markosindustries.distroboy.core.operations.FlatMapOp<java.util.List<org.apache.kafka.common.TopicPartition>,org.apache.kafka.clients.consumer.ConsumerRecord<K,V>>
FlatMap a given set of TopicPartitions by loading all records from the starting offsets
(inclusive) to the ending offsets (exclusive) specified.
-
Constructor Summary
Constructors Constructor Description ReadKafkaTopicPartitionRange(org.apache.kafka.clients.consumer.Consumer<K,V> kafkaConsumer, KafkaOffsetSpec startOffsetInclusiveSpec, KafkaOffsetSpec endOffsetExclusiveSpec)
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.markosindustries.distroboy.core.operations.FlatMapOp
apply
Methods inherited from interface com.markosindustries.distroboy.core.operations.ListOp
collect
-
Constructor Details
-
ReadKafkaTopicPartitionRange
public ReadKafkaTopicPartitionRange(org.apache.kafka.clients.consumer.Consumer<K,V> kafkaConsumer, KafkaOffsetSpec startOffsetInclusiveSpec, KafkaOffsetSpec endOffsetExclusiveSpec)- Parameters:
kafkaConsumer
- AKafkaConsumer
to communicate with Kafka viastartOffsetInclusiveSpec
- The starting offset spec (inclusive)endOffsetExclusiveSpec
- The end offset spec (exclusive)
-
-
Method Details
-
flatMap
-