Class PubSubSplitIterator

java.lang.Object
com.linkedin.venice.vpj.pubsub.input.PubSubSplitIterator
All Implemented Interfaces:
AutoCloseable

public class PubSubSplitIterator extends Object implements AutoCloseable
PubSubSplitIterator provides an iterator-like abstraction over a bounded range of messages from a PubSubConsumerAdapter. It is designed for Venice Push Job (VPJ) repush use cases where a split of a topic-partition needs to be consumed deterministically between a start and an end position.

This class:

  • Subscribes a PubSubConsumerAdapter to a specific PubSubTopicPartition.
  • Starts reading from a caller-specified PubSubPosition (inclusive) and stops when reaching the end-exclusive position or the record count limit.
  • Supports both numeric offsets and logical index–based offsets for progress tracking.
  • Skips control messages transparently while tracking statistics about consumption.
  • Field Details

    • DEFAULT_POLL_TIMEOUT_MS

      public static final long DEFAULT_POLL_TIMEOUT_MS
    • DEFAULT_EMPTY_RESULT_RETRIES

      public static final int DEFAULT_EMPTY_RESULT_RETRIES
      See Also:
    • DEFAULT_EMPTY_SLEEP_MS

      public static final long DEFAULT_EMPTY_SLEEP_MS
  • Constructor Details

  • Method Details