Trait

net.manub.embeddedkafka.ops

ConsumerOps

Related Doc: package ops

Permalink

trait ConsumerOps[C <: EmbeddedKafkaConfig] extends AnyRef

Trait for Consumer-related actions.

C

an EmbeddedKafkaConfig

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ConsumerOps
  2. AnyRef
  3. 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. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def consumeFirstKeyedMessageFrom[K, V](topic: String, autoCommit: Boolean = false)(implicit config: C, keyDeserializer: Deserializer[K], valueDeserializer: Deserializer[V]): (K, V)

    Permalink

    Consumes the first message available in a given topic, deserializing it as type V).

    Consumes the first message available in a given topic, deserializing it as type V).

    Only the message that is returned is committed if autoCommit is false. If autoCommit is true then all messages that were polled will be committed.

    topic

    the topic to consume a message from

    autoCommit

    if false, only the offset for the consumed message will be committed. if true, the offset for the last polled message will be committed instead. Defaulted to false.

    config

    an implicit EmbeddedKafkaConfig

    keyDeserializer

    an implicit org.apache.kafka.common.serialization.Deserializer for the type K

    valueDeserializer

    an implicit org.apache.kafka.common.serialization.Deserializer for the type V

    returns

    the first message consumed from the given topic, with a type V)

    Annotations
    @throws( classOf[TimeoutException] ) @throws( classOf[KafkaUnavailableException] )
    Exceptions thrown

    KafkaUnavailableException if unable to connect to Kafka

    TimeoutException if unable to consume a message within 5 seconds

  7. def consumeFirstMessageFrom[V](topic: String, autoCommit: Boolean = false)(implicit config: C, valueDeserializer: Deserializer[V]): V

    Permalink

    Consumes the first message available in a given topic, deserializing it as type V.

    Consumes the first message available in a given topic, deserializing it as type V.

    Only the message that is returned is committed if autoCommit is false. If autoCommit is true then all messages that were polled will be committed.

    topic

    the topic to consume a message from

    autoCommit

    if false, only the offset for the consumed message will be committed. if true, the offset for the last polled message will be committed instead. Defaulted to false.

    config

    an implicit EmbeddedKafkaConfig

    valueDeserializer

    an implicit org.apache.kafka.common.serialization.Deserializer for the type V

    returns

    the first message consumed from the given topic, with a type V

    Annotations
    @throws( classOf[TimeoutException] ) @throws( classOf[KafkaUnavailableException] )
    Exceptions thrown

    KafkaUnavailableException if unable to connect to Kafka

    TimeoutException if unable to consume a message within 5 seconds

  8. def consumeFirstStringMessageFrom(topic: String, autoCommit: Boolean = false)(implicit config: C): String

    Permalink
  9. def consumeNumberKeyedMessagesFrom[K, V](topic: String, number: Int, autoCommit: Boolean = false)(implicit config: C, keyDeserializer: Deserializer[K], valueDeserializer: Deserializer[V]): List[(K, V)]

    Permalink
  10. def consumeNumberKeyedMessagesFromTopics[K, V](topics: Set[String], number: Int, autoCommit: Boolean = false, timeout: Duration = 5.seconds, resetTimeoutOnEachMessage: Boolean = true)(implicit config: C, keyDeserializer: Deserializer[K], valueDeserializer: Deserializer[V]): Map[String, List[(K, V)]]

    Permalink

    Consumes the first n messages available in given topics, deserializes them as type V), and returns the n messages in a Map from topic name to List[(K, V)].

    Consumes the first n messages available in given topics, deserializes them as type V), and returns the n messages in a Map from topic name to List[(K, V)].

    Only the messages that are returned are committed if autoCommit is false. If autoCommit is true then all messages that were polled will be committed.

    topics

    the topics to consume messages from

    number

    the number of messages to consume in a batch

    autoCommit

    if false, only the offset for the consumed messages will be committed. if true, the offset for the last polled message will be committed instead. Defaulted to false.

    timeout

    the interval to wait for messages before throwing TimeoutException

    resetTimeoutOnEachMessage

    when true, throw TimeoutException if we have a silent period (no incoming messages) for the timeout interval; when false, throw TimeoutException after the timeout interval if we haven't received all of the expected messages

    config

    an implicit EmbeddedKafkaConfig

    keyDeserializer

    an implicit org.apache.kafka.common.serialization.Deserializer for the type K

    valueDeserializer

    an implicit org.apache.kafka.common.serialization.Deserializer for the type V

    returns

    the List of messages consumed from the given topics, each with a type V)

    Exceptions thrown

    KafkaUnavailableException if unable to connect to Kafka

    TimeoutException if unable to consume messages within specified timeout

  11. def consumeNumberMessagesFrom[V](topic: String, number: Int, autoCommit: Boolean = false)(implicit config: C, valueDeserializer: Deserializer[V]): List[V]

    Permalink
  12. def consumeNumberMessagesFromTopics[V](topics: Set[String], number: Int, autoCommit: Boolean = false, timeout: Duration = 5.seconds, resetTimeoutOnEachMessage: Boolean = true)(implicit config: C, valueDeserializer: Deserializer[V]): Map[String, List[V]]

    Permalink

    Consumes the first n messages available in given topics, deserializes them as type V, and returns the n messages in a Map from topic name to List[V].

    Consumes the first n messages available in given topics, deserializes them as type V, and returns the n messages in a Map from topic name to List[V].

    Only the messages that are returned are committed if autoCommit is false. If autoCommit is true then all messages that were polled will be committed.

    topics

    the topics to consume messages from

    number

    the number of messages to consume in a batch

    autoCommit

    if false, only the offset for the consumed messages will be committed. if true, the offset for the last polled message will be committed instead. Defaulted to false.

    timeout

    the interval to wait for messages before throwing TimeoutException

    resetTimeoutOnEachMessage

    when true, throw TimeoutException if we have a silent period (no incoming messages) for the timeout interval; when false, throw TimeoutException after the timeout interval if we haven't received all of the expected messages

    config

    an implicit EmbeddedKafkaConfig

    valueDeserializer

    an implicit org.apache.kafka.common.serialization.Deserializer for the type V

    returns

    the List of messages consumed from the given topics, each with a type V

    Exceptions thrown

    KafkaUnavailableException if unable to connect to Kafka

    TimeoutException if unable to consume messages within specified timeout

  13. def consumeNumberStringMessagesFrom(topic: String, number: Int, autoCommit: Boolean = false)(implicit config: C): List[String]

    Permalink
  14. val consumerPollingTimeout: FiniteDuration

    Permalink
    Attributes
    protected
  15. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

    Permalink
    Definition Classes
    Any
  21. def kafkaConsumer[K, T](implicit config: C, keyDeserializer: Deserializer[K], deserializer: Deserializer[T]): KafkaConsumer[K, T]

    Permalink
  22. final def ne(arg0: AnyRef): Boolean

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

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

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

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

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

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped