Class KafkaTopicPartitionsSource

java.lang.Object
com.markosindustries.distroboy.kafka.KafkaTopicPartitionsSource
All Implemented Interfaces:
com.markosindustries.distroboy.core.operations.DataSource<List<org.apache.kafka.common.TopicPartition>>, com.markosindustries.distroboy.core.operations.Operand<List<org.apache.kafka.common.TopicPartition>,List<List<org.apache.kafka.common.TopicPartition>>>

public class KafkaTopicPartitionsSource extends Object implements com.markosindustries.distroboy.core.operations.DataSource<List<org.apache.kafka.common.TopicPartition>>
A DataSource which will yield all TopicPartitions available on the Kafka cluster for a given set of topics.
  • Constructor Details

    • KafkaTopicPartitionsSource

      public KafkaTopicPartitionsSource(Map<String,Object> kafkaConfiguration, Collection<String> topics)
      Parameters:
      kafkaConfiguration - A Map of Configuration needed to instantiate a KafkaConsumer to communicate with Kafka via
      topics - The set of topics to retrieve TopicPartitions for
  • Method Details

    • countOfFullSet

      public long countOfFullSet()
      Specified by:
      countOfFullSet in interface com.markosindustries.distroboy.core.operations.DataSource<List<org.apache.kafka.common.TopicPartition>>
    • enumerateRangeOfFullSet

      public com.markosindustries.distroboy.core.iterators.IteratorWithResources<List<org.apache.kafka.common.TopicPartition>> enumerateRangeOfFullSet(long startInclusive, long endExclusive)
      Specified by:
      enumerateRangeOfFullSet in interface com.markosindustries.distroboy.core.operations.DataSource<List<org.apache.kafka.common.TopicPartition>>