sealed abstract class CommittableOffsetBatch[F[_]] extends AnyRef
CommittableOffsetBatch represents a batch of Kafka offsets which can be committed
together using commit. An offset, or one more batch, can be added an existing batch using
updated
. Note that this requires the offsets per topic-partition to be included in-order,
since offset commits in general require it.
Use CommittableOffsetBatch#empty to create an empty batch. The CommittableOffset#batch
function can be used to create a batch from an existing CommittableOffset.
If you have some offsets in-order per topic-partition, you can fold them together using
CommittableOffsetBatch#empty and updated
, or you can use
CommittableOffsetBatch#fromFoldable. Generally, prefer to use fromFoldable
, as it has
better performance. Provided pipes like commitBatchWithin are also to be preferred, as they
also achieve better performance.
- Alphabetic
- By Inheritance
- CommittableOffsetBatch
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def commit: F[Unit]
Commits the offsets to Kafka in a single commit.
Commits the offsets to Kafka in a single commit. For the batch to be valid and for commit to succeed, the following conditions must hold:
- consumerGroupIdsMissing must be false, and
- consumerGroupIds must have exactly one ID.
If one of the conditions above do not hold, there will be a ConsumerGroupException exception raised and a commit will not be attempted. If offsets is empty then these conditions do not need to hold, as there is nothing to commit.
- consumerGroupIdsMissing must be false, and
- abstract def consumerGroupIds: Set[String]
The consumer group IDs for the offsets in the batch.
The consumer group IDs for the offsets in the batch. For the batch to be valid and for commit to succeed, there should be exactly one ID in the set and the flag consumerGroupIdsMissing should be
false
.There might be more than one consumer group ID in the set if offsets from multiple consumers, with different group IDs, have accidentally been mixed. The set might also be empty if no consumer group IDs have been specified.
- abstract def consumerGroupIdsMissing: Boolean
true
if any offset in the batch came from a consumer without a group ID;false
otherwise.true
if any offset in the batch came from a consumer without a group ID;false
otherwise. For the batch to be valid and for commit to succeed, this flag must befalse
and there should be exactly one consumer group ID in consumerGroupIds. - abstract def offsets: Map[TopicPartition, OffsetAndMetadata]
The offsets included in the CommittableOffsetBatch.
- abstract def updated(that: CommittableOffsetBatch[F]): CommittableOffsetBatch[F]
Creates a new CommittableOffsetBatch with the specified offsets included.
Creates a new CommittableOffsetBatch with the specified offsets included. Note that this function requires offsets to be in-order per topic-partition, as provided offsets will override existing offsets for the same topic-partition.
- abstract def updated(that: CommittableOffset[F]): CommittableOffsetBatch[F]
Creates a new CommittableOffsetBatch with the specified offset included.
Creates a new CommittableOffsetBatch with the specified offset included. Note that this function requires offsets to be in-order per topic-partition, as provided offsets will override existing offsets for the same topic-partition.
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()