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.

Source
CommittableOffsetBatch.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CommittableOffsetBatch
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

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

    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.

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

  3. 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 be false and there should be exactly one consumer group ID in consumerGroupIds.

  4. abstract def offsets: Map[TopicPartition, OffsetAndMetadata]

    The offsets included in the CommittableOffsetBatch.

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

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

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped