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
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.

def consumerGroupId: Option[String]

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.

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.

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)
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.