Packages

c

org.apache.pekko.kafka.internal

ConsumerProgressTrackerImpl

final class ConsumerProgressTrackerImpl extends ConsumerProgressTracking

Track the progress/state of the consumer. We generally try to be 'fast' with handling the partitions we track; most of the smarts are expected to be handled outside this class. For example, we will update any offsets to commit - commitRequested - without regard for what had previously been assigned or revoked from the consumer. Thus, care should be taken when managing state of the consumer and making updates.

The only case we try and be "smart" is during received, where we will filter out offsets that are not currently assigned; ensuring that we don't try to waste cycles on partitions that we no longer care about. This matches downstream behavior where the SourceLogicBuffer filters out revoked partitions.

Annotations
@InternalApi()
Source
ConsumerProgressTracking.scala
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ConsumerProgressTrackerImpl
  2. ConsumerProgressTracking
  3. ConsumerAssignmentTrackingListener
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ConsumerProgressTrackerImpl()

Value Members

  1. def addProgressTrackingCallback(callback: ConsumerAssignmentTrackingListener): Unit
  2. def assignedPositions(assignedTps: Set[TopicPartition], assignedOffsets: Map[TopicPartition, Long]): Unit
  3. def assignedPositionsAndSeek(assignedTps: Set[TopicPartition], consumer: Consumer[_, _], positionTimeout: Duration): Unit
  4. def commitRequested(offsets: Map[TopicPartition, OffsetAndMetadata]): Unit
  5. def commitRequested: Map[TopicPartition, OffsetAndMetadata]
  6. def committed(offsets: Map[TopicPartition, OffsetAndMetadata]): Unit
  7. def committedOffsets: Map[TopicPartition, OffsetAndMetadata]
  8. def received[K, V](received: ConsumerRecords[K, V]): Unit
  9. def receivedMessages: Map[TopicPartition, SafeOffsetAndTimestamp]
  10. def revoke(revokedTps: Set[TopicPartition]): Unit