Packages

class KafkaConsumer extends KafkaConsumerInterface with LazyLogging

A Kafka Client that uses Pekko Connectors Kafka Consumer under the hood to create a stream of events from a Kafka cluster. To configure the Pekko Connectors Kafka Consumer use the standard typesafe configuration i.e. pekko.kafka.consumer (note that the keySerializer and valueSerializer are hardcoded so you cannot override this).

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. KafkaConsumer
  2. LazyLogging
  3. KafkaConsumerInterface
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new KafkaConsumer(configureConsumer: Option[(ConsumerSettings[Array[Byte], Array[Byte]]) => ConsumerSettings[Array[Byte], Array[Byte]]] = None, configureCommitter: Option[(CommitterSettings) => CommitterSettings] = None)(implicit system: ActorSystem, kafkaClusterConfig: KafkaCluster, backupConfig: Backup)

    configureConsumer

    A way to configure the underlying Kafka consumer settings

    configureCommitter

    A way to configure the underlying kafka committer settings

    system

    A classic ActorSystem

    kafkaClusterConfig

    Additional cluster configuration that is needed

Type Members

  1. type BatchedCursorContext = CommittableOffsetBatch

    The type that represents the result of batching a CursorContext

    The type that represents the result of batching a CursorContext

    Definition Classes
    KafkaConsumerKafkaConsumerInterface
  2. type Control = org.apache.pekko.kafka.scaladsl.Consumer.Control

    The type that represents how to control the given stream, i.e.

    The type that represents how to control the given stream, i.e. if you want to shut it down or add metrics

    Definition Classes
    KafkaConsumerKafkaConsumerInterface
  3. type CursorContext = CommittableOffset

    The type of the context to pass around.

    The type of the context to pass around. In context of a Kafka consumer, this typically holds offset data to be automatically committed

    Definition Classes
    KafkaConsumerKafkaConsumerInterface
  4. type MatCombineResult = DrainingControl[Done]

    The type that represents the result of the combine parameter that is supplied to pekko.stream.scaladsl.Source.toMat

    The type that represents the result of the combine parameter that is supplied to pekko.stream.scaladsl.Source.toMat

    Definition Classes
    KafkaConsumerKafkaConsumerInterface

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 batchCursorContext(cursors: Iterable[CommittableOffset]): CommittableOffsetBatch

    How to batch an immutable iterable of CursorContext into a BatchedCursorContext

    How to batch an immutable iterable of CursorContext into a BatchedCursorContext

    cursors

    The cursors that need to be batched

    returns

    A collection data structure that represents the batched cursors

    Definition Classes
    KafkaConsumerKafkaConsumerInterface
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  7. def commitCursor: Sink[CommittableOffsetBatch, Future[Done]]

    returns

    A Sink that allows you to commit a CursorContext to Kafka to signify you have processed a message

    Definition Classes
    KafkaConsumerKafkaConsumerInterface
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  11. def getSource: SourceWithContext[ReducedConsumerRecord, CommittableOffset, org.apache.pekko.kafka.scaladsl.Consumer.Control]

    returns

    A SourceWithContext that returns a Kafka Stream which automatically handles committing of cursors

    Definition Classes
    KafkaConsumerKafkaConsumerInterface
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. lazy val logger: Logger
    Attributes
    protected
    Definition Classes
    LazyLogging
    Annotations
    @transient()
  15. def matCombine: (org.apache.pekko.kafka.scaladsl.Consumer.Control, Future[Done]) => DrainingControl[Done]

    returns

    The result of this function gets directly passed into the combine parameter of pekko.stream.scaladsl.Source.toMat

    Definition Classes
    KafkaConsumerKafkaConsumerInterface
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  19. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  22. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from LazyLogging

Inherited from KafkaConsumerInterface

Inherited from AnyRef

Inherited from Any

Ungrouped