Object

akka.kafka.scaladsl

Consumer

Related Doc: package scaladsl

Permalink

object Consumer

Akka Stream connector for subscribing to Kafka topics.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Consumer
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final case class ClientTopicPartition(clientId: String, topic: String, partition: Int) extends Product with Serializable

    Permalink

    clientId, topic, partition key for an offset position.

  2. trait Committable extends AnyRef

    Permalink

    Commit an offset that is included in a CommittableMessage.

    Commit an offset that is included in a CommittableMessage. If you need to store offsets in anything other than Kafka, this API should not be used.

    This interface might move into akka.stream

  3. final case class CommittableMessage[K, V](key: K, value: V, committableOffset: CommittableOffset) extends Message[K, V] with Product with Serializable

    Permalink

    Output element of committableSource.

    Output element of committableSource. The offset can be committed via the included CommittableOffset.

  4. trait CommittableOffset extends Committable

    Permalink

    Included in CommittableMessage.

    Included in CommittableMessage. Makes it possible to commit an offset with the Committable#commit method or aggregate several offsets in a batch before committing.

    Note that the offset position that is committed to Kafka will automatically be one more than the offset of the message, because the committed offset should be the next message your application will consume, i.e. lastProcessedMessageOffset + 1.

  5. trait CommittableOffsetBatch extends Committable

    Permalink

    For improved efficiency it is good to aggregate several CommittableOffset, using this class, before committing them.

    For improved efficiency it is good to aggregate several CommittableOffset, using this class, before committing them. Start with the empty] batch.

  6. trait Control extends AnyRef

    Permalink

    Materialized value of the consumer Source.

  7. trait Message[K, V] extends AnyRef

    Permalink

    Output element of atMostOnceSource.

  8. final case class PartitionOffset(key: ClientTopicPartition, offset: Long) extends Product with Serializable

    Permalink

    Offset position for a clientId, topic, partition.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object CommittableOffsetBatch

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def atMostOnceSource[K, V](settings: ConsumerSettings[K, V]): Source[Message[K, V], Control]

    Permalink

    Convenience for "at-most once delivery" semantics.

    Convenience for "at-most once delivery" semantics. The offset of each message is committed to Kafka before emitted downstreams.

  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def committableSource[K, V](settings: ConsumerSettings[K, V]): Source[CommittableMessage[K, V], Control]

    Permalink

    The committableSource makes it possible to commit offset positions to Kafka.

    The committableSource makes it possible to commit offset positions to Kafka. This is useful when "at-least once delivery" is desired, as each message will likely be delivered one time but in failure cases could be duplicated.

    If you commit the offset before processing the message you get "at-most once delivery" semantics, and for that there is a #atMostOnceSource.

    Compared to auto-commit this gives exact control of when a message is considered consumed.

    If you need to store offsets in anything other than Kafka, #plainSource should be used instead of this API.

  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def plainSource[K, V](settings: ConsumerSettings[K, V]): Source[ConsumerRecord[K, V], Control]

    Permalink

    The plainSource emits ConsumerRecord elements (as received from the underlying KafkaConsumer).

    The plainSource emits ConsumerRecord elements (as received from the underlying KafkaConsumer). It has not support for committing offsets to Kafka. It can be used when offset is stored externally or with auto-commit (note that auto-commit is by default disabled).

    The consumer application need not use Kafka's built-in offset storage, it can store offsets in a store of its own choosing. The primary use case for this is allowing the application to store both the offset and the results of the consumption in the same system in a way that both the results and offsets are stored atomically. This is not always possible, but when it is it will make the consumption fully atomic and give "exactly once" semantics that are stronger than the "at-least once" semantics you get with Kafka's offset commit functionality.

  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped