Packages

trait MockKafkaProducer extends AnyRef

Defines methods for a mock kafka producer: allows for checking for test messages and provides a MkProducer instance. Keeps an internal offset for each topic so that messages can be consumed one by one with convenience methods.

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

Abstract Value Members

  1. abstract def historyFor[K, V](topic: String, key: K)(implicit arg0: Eq[K], keyDeserializer: KeyDeserializer[IO, K], valueDeserializer: ValueDeserializer[IO, V]): IO[List[V]]

    Returns the list of published messages for the given topic and key.

    Returns the list of published messages for the given topic and key.

    K

    the key type

    V

    the value type

    topic

    the topic to get the history for

    key

    the key to get the history for

    keyDeserializer

    the key deserializer

    valueDeserializer

    the value deserializer

    returns

    the list of published messages thus far

  2. abstract def historyFor[K, V](topic: String)(implicit keyDeserializer: KeyDeserializer[IO, K], valueDeserializer: ValueDeserializer[IO, V]): IO[List[(K, V)]]

    Returns the list of published messages for the given topic.

    Returns the list of published messages for the given topic.

    K

    the key type

    V

    the value type

    topic

    the topic to get the history for

    keyDeserializer

    the key deserializer

    valueDeserializer

    the value deserializer

    returns

    the list of published messages thus far

  3. implicit abstract def mkProducer: MkProducer[IO]

    MkProducer instance providing the mock producer.

    MkProducer instance providing the mock producer. Including this instance in implicit scope where the kafka producer is created will feed it with the mock producer instance instead of the real one

  4. abstract def nextEventualMessageFor[K, V](topic: String)(implicit patience: Patience, keyDeserializer: KeyDeserializer[IO, K], valueDeserializer: ValueDeserializer[IO, V]): IO[(K, V)]

    Returns the next message for the given topic.

    Returns the next message for the given topic. Semantically blocks, with polling intervals and timeout specified with the patience implicit parameter

    topic

    the topic to get the next message for

    patience

    the patience to use for polling for the next message

    keyDeserializer

    the key deserializer

    valueDeserializer

    the value deserializer

    Exceptions thrown

    `NoSuchElementException` if no message is available before the timeout

  5. abstract def nextEventualValueFor[K, V](topic: String, key: K)(implicit arg0: Eq[K], patience: Patience, keyDeserializer: KeyDeserializer[IO, K], valueDeserializer: ValueDeserializer[IO, V]): IO[V]

    Returns the next message for the given topic and key.

    Returns the next message for the given topic and key. Semantically blocks, with polling intervals and timeout specified with the patience implicit parameter

    topic

    the topic to get the next message for

    key

    the key to get the next message for

    patience

    the patience to use for polling for the next message

    keyDeserializer

    the key deserializer

    valueDeserializer

    the value deserializer

    Exceptions thrown

    `NoSuchElementException` if no message is available before the timeout

  6. abstract def nextMessageFor[K, V](topic: String)(implicit keyDeserializer: KeyDeserializer[IO, K], valueDeserializer: ValueDeserializer[IO, V]): IO[Option[(K, V)]]

    Returns the next message for the given topic, if any.

    Returns the next message for the given topic, if any. Increments the internal offset for the topic.

    K

    the key type

    V

    the value type

    topic

    the topic to get the next message for

    keyDeserializer

    the key deserializer

    valueDeserializer

    the value deserializer

    returns

    the next message for the given topic, if any

  7. abstract def nextValueFor[K, V](topic: String, key: K)(implicit arg0: Eq[K], keyDeserializer: KeyDeserializer[IO, K], valueDeserializer: ValueDeserializer[IO, V]): IO[Option[V]]

    Returns the next message for the given topic and key, if any.

    Returns the next message for the given topic and key, if any. Increments the internal offset for the topic.

    K

    the key type

    V

    the value type

    topic

    the topic to get the next message for

    key

    the key to get the next message for

    keyDeserializer

    the key deserializer

    valueDeserializer

    the value deserializer

    returns

    the next message for the given topic and key, if any

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]) @IntrinsicCandidate() @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  18. 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 AnyRef

Inherited from Any

Ungrouped