Object/Trait

monix.kafka

KafkaConsumerObservable

Related Docs: trait KafkaConsumerObservable | package kafka

Permalink

object KafkaConsumerObservable extends Serializable

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. KafkaConsumerObservable
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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. def apply[K, V](cfg: KafkaConsumerConfig, topicsRegex: Regex)(implicit K: Deserializer[K], V: Deserializer[V]): KafkaConsumerObservable[K, V, ConsumerRecord[K, V]]

    Permalink

    Builds a KafkaConsumerObservable instance.

    Builds a KafkaConsumerObservable instance.

    cfg

    is the KafkaConsumerConfig needed for initializing the consumer; also make sure to see monix/kafka/default.conf for the default values being used.

    topicsRegex

    is the pattern of Kafka topics to subscribe to.

  5. def apply[K, V](cfg: KafkaConsumerConfig, topics: List[String])(implicit K: Deserializer[K], V: Deserializer[V]): KafkaConsumerObservable[K, V, ConsumerRecord[K, V]]

    Permalink

    Builds a KafkaConsumerObservable instance.

    Builds a KafkaConsumerObservable instance.

    cfg

    is the KafkaConsumerConfig needed for initializing the consumer; also make sure to see monix/kafka/default.conf for the default values being used.

    topics

    is the list of Kafka topics to subscribe to.

  6. def apply[K, V](cfg: KafkaConsumerConfig, consumer: Task[Consumer[K, V]]): KafkaConsumerObservable[K, V, ConsumerRecord[K, V]]

    Permalink

    Builds a KafkaConsumerObservable instance.

    Builds a KafkaConsumerObservable instance.

    cfg

    is the KafkaConsumerConfig needed for initializing the consumer; also make sure to see monix/kafka/default.conf for the default values being used.

    consumer

    is a factory for the org.apache.kafka.clients.consumer.KafkaConsumer instance to use for consuming from Kafka

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def createConsumer[K, V](config: KafkaConsumerConfig, topicsRegex: Regex)(implicit K: Deserializer[K], V: Deserializer[V]): Task[Consumer[K, V]]

    Permalink

    Returns a Task for creating a consumer instance given topics regex.

  10. def createConsumer[K, V](config: KafkaConsumerConfig, topics: List[String])(implicit K: Deserializer[K], V: Deserializer[V]): Task[Consumer[K, V]]

    Permalink

    Returns a Task for creating a consumer instance given list of topics.

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

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

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

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

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

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

    Permalink
    Definition Classes
    Any
  17. def manualCommit[K, V](cfg: KafkaConsumerConfig, topicsRegex: Regex)(implicit K: Deserializer[K], V: Deserializer[V]): KafkaConsumerObservable[K, V, CommittableMessage[K, V]]

    Permalink

    Builds a KafkaConsumerObservable instance with ability to manual commit offsets and forcibly disables auto commits in configuration.

    Builds a KafkaConsumerObservable instance with ability to manual commit offsets and forcibly disables auto commits in configuration. Such instances emit CommittableMessage instead of Kafka's ConsumerRecord.

    Usage example:

    KafkaConsumerObservable.manualCommit[String,String](consumerCfg, List(topicName))
      .map(message => message.record.value() -> message.committableOffset)
      .mapEval { case (value, offset) => performBusinessLogic(value).map(_ => offset) }
      .bufferTimedAndCounted(1.second, 1000)
      .mapEval(offsets => CommittableOffsetBatch(offsets).commitSync())
      .subscribe()
    cfg

    is the KafkaConsumerConfig needed for initializing the consumer; also make sure to see monix/kafka/default.conf for the default values being used. Auto commit will disabled and observable commit order will turned to NoAck forcibly!

    topicsRegex

    is the pattern of Kafka topics to subscribe to.

  18. def manualCommit[K, V](cfg: KafkaConsumerConfig, topics: List[String])(implicit K: Deserializer[K], V: Deserializer[V]): KafkaConsumerObservable[K, V, CommittableMessage[K, V]]

    Permalink

    Builds a KafkaConsumerObservable instance with ability to manual commit offsets and forcibly disables auto commits in configuration.

    Builds a KafkaConsumerObservable instance with ability to manual commit offsets and forcibly disables auto commits in configuration. Such instances emit CommittableMessage instead of Kafka's ConsumerRecord.

    Usage example:

    KafkaConsumerObservable.manualCommit[String,String](consumerCfg, List(topicName))
      .map(message => message.record.value() -> message.committableOffset)
      .mapEval { case (value, offset) => performBusinessLogic(value).map(_ => offset) }
      .bufferTimedAndCounted(1.second, 1000)
      .mapEval(offsets => CommittableOffsetBatch(offsets).commitSync())
      .subscribe()
    cfg

    is the KafkaConsumerConfig needed for initializing the consumer; also make sure to see monix/kafka/default.conf for the default values being used. Auto commit will disabled and observable commit order will turned to NoAck forcibly!

    topics

    is the list of Kafka topics to subscribe to.

  19. def manualCommit[K, V](cfg: KafkaConsumerConfig, consumer: Task[Consumer[K, V]]): KafkaConsumerObservable[K, V, CommittableMessage[K, V]]

    Permalink

    Builds a KafkaConsumerObservable instance with ability to manual commit offsets and forcibly disables auto commits in configuration.

    Builds a KafkaConsumerObservable instance with ability to manual commit offsets and forcibly disables auto commits in configuration. Such instances emit CommittableMessage instead of Kafka's ConsumerRecord.

    Usage example:

    KafkaConsumerObservable.manualCommit[String,String](consumerCfg, List(topicName))
      .map(message => message.record.value() -> message.committableOffset)
      .mapEval { case (value, offset) => performBusinessLogic(value).map(_ => offset) }
      .bufferTimedAndCounted(1.second, 1000)
      .mapEval(offsets => CommittableOffsetBatch(offsets).commitSync())
      .subscribe()
    cfg

    is the KafkaConsumerConfig needed for initializing the consumer; also make sure to see monix/kafka/default.conf for the default values being used. Auto commit will disabled and observable commit order will turned to NoAck forcibly!

    consumer

    is a factory for the org.apache.kafka.clients.consumer.KafkaConsumer instance to use for consuming from Kafka

  20. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  23. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

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

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

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped