CommittableOffset

sealed abstract class CommittableOffset[F[_]]

CommittableOffset represents an offsetAndMetadata for a topicPartition, along with the ability to commit that offset to Kafka with commit. Note that offsets are normally committed in batches for performance reasons. Pipes like commitBatchWithin use CommittableOffsetBatch to commit the offsets in batches.

While normally not necessary, CommittableOffset#apply can be used to create a new instance.

Companion:
object
Source:
CommittableOffset.scala
class Object
trait Matchable
class Any

Value members

Abstract methods

def commit: F[Unit]

Commits the offsetAndMetadata for the topicPartition to Kafka. Note that offsets are normally committed in batches for performance reasons. Prefer pipes like commitBatchWithin or CommittableOffsetBatch for that reason.

Commits the offsetAndMetadata for the topicPartition to Kafka. Note that offsets are normally committed in batches for performance reasons. Prefer pipes like commitBatchWithin or CommittableOffsetBatch for that reason.

Source:
CommittableOffset.scala

The consumer group ID of the consumer that fetched the offsetAndMetadata from the topicPartition from Kafka.

Required for committing offsets within a transaction.

The consumer group ID of the consumer that fetched the offsetAndMetadata from the topicPartition from Kafka.

Required for committing offsets within a transaction.

Source:
CommittableOffset.scala
def offsetAndMetadata: OffsetAndMetadata

The offset and metadata for the topicPartition, which can be committed using commit.

The offset and metadata for the topicPartition, which can be committed using commit.

Source:
CommittableOffset.scala
def offsets: Map[TopicPartition, OffsetAndMetadata]

The topicPartition and offsetAndMetadata as a Map. This is provided for convenience and is always guaranteed to be equivalent to the following.

The topicPartition and offsetAndMetadata as a Map. This is provided for convenience and is always guaranteed to be equivalent to the following.

Map(topicPartition -> offsetAndMetadata)
Source:
CommittableOffset.scala
def topicPartition: TopicPartition

The topic and partition for which offsetAndMetadata can be committed using commit.

The topic and partition for which offsetAndMetadata can be committed using commit.

Source:
CommittableOffset.scala