← ZIO Kafka docs

Offset

zio.kafka.consumer.Offset
See theOffset companion object
trait Offset

The offset of a consumed record.

Attributes

Companion
object
Source
Offset.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

Attributes

Source
Offset.scala
def commit: Task[Unit]

Commit the next offset.

Commit the next offset.

Attributes

Source
Offset.scala
def consumerGroupMetadata: Option[ConsumerGroupMetadata]

Attributes

Source
Offset.scala
def leaderEpoch: Optional[Integer]

The leader-epoch in which the record was consumed.

The leader-epoch in which the record was consumed.

Attributes

Source
Offset.scala
def nextOffset: OffsetAndMetadata

The committable next offset.

The committable next offset.

Attributes

Source
Offset.scala
def offset: Long

The consumed record's offset.

The consumed record's offset.

Attributes

Source
Offset.scala
def partition: Int

Attributes

Source
Offset.scala
def topic: String

Attributes

Source
Offset.scala
def withMetadata(metadata: String): Offset

Add metadata to the commit.

Add metadata to the commit.

Attributes

Source
Offset.scala

Concrete methods

final def commitOrRetry[R](policy: Schedule[R, Throwable, Any]): RIO[R, Unit]

Attempts to commit and retries according to the given policy when the commit fails with a RetriableCommitFailedException or commit timeout.

Attempts to commit and retries according to the given policy when the commit fails with a RetriableCommitFailedException or commit timeout.

Attributes

Source
Offset.scala

Concrete fields

final lazy val topicPartition: TopicPartition

Attributes

Source
Offset.scala