object EmbeddedKafka extends EmbeddedKafkaSupport

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EmbeddedKafka
  2. EmbeddedKafkaSupport
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

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[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def consumeFirstMessageFrom[T](topic: String, autoCommit: Boolean = false)(implicit config: EmbeddedKafkaConfig, deserializer: Deserializer[T]): T

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

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

    Only the messsage 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 commited. if true, the offset for the last polled message will be committed instead. Defaulted to false.

    config

    an implicit EmbeddedKafkaConfig

    deserializer

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

    returns

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

    Definition Classes
    EmbeddedKafkaSupport
    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 consumeFirstStringMessageFrom(topic: String, autoCommit: Boolean = false)(implicit config: EmbeddedKafkaConfig): String
    Definition Classes
    EmbeddedKafkaSupport
  8. def createCustomTopic(topic: String, topicConfig: Map[String, String] = Map.empty, partitions: Int = 1, replicationFactor: Int = 1)(implicit config: EmbeddedKafkaConfig): Unit

    Creates a topic with a custom configuration

    Creates a topic with a custom configuration

    topic

    the topic name

    topicConfig

    per topic configuration Map

    partitions

    number of partitions Int

    replicationFactor

    replication factor Int

    config

    an implicit EmbeddedKafkaConfig

    Definition Classes
    EmbeddedKafkaSupport
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. def isRunning: Boolean

    Returns whether the in memory Kafka and Zookeeper are running.

  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  19. def publishStringMessageToKafka(topic: String, message: String)(implicit config: EmbeddedKafkaConfig): Unit

    Publishes synchronously a message of type String to the running Kafka broker.

    Publishes synchronously a message of type String to the running Kafka broker.

    topic

    the topic to which publish the message (it will be auto-created)

    message

    the String message to publish

    config

    an implicit EmbeddedKafkaConfig

    Definition Classes
    EmbeddedKafkaSupport
    Exceptions thrown

    KafkaUnavailableException if unable to connect to Kafka

    See also

    EmbeddedKafka#publishToKafka

  20. def publishToKafka[K, T](topic: String, key: K, message: T)(implicit config: EmbeddedKafkaConfig, keySerializer: Serializer[K], serializer: Serializer[T]): Unit

    Publishes synchronously a message to the running Kafka broker.

    Publishes synchronously a message to the running Kafka broker.

    topic

    the topic to which publish the message (it will be auto-created)

    key

    the key of type K to publish

    message

    the message of type T to publish

    config

    an implicit EmbeddedKafkaConfig

    serializer

    an implicit Serializer for the type T

    Definition Classes
    EmbeddedKafkaSupport
    Annotations
    @throws( classOf[KafkaUnavailableException] )
    Exceptions thrown

    KafkaUnavailableException if unable to connect to Kafka

  21. def publishToKafka[T](topic: String, message: T)(implicit config: EmbeddedKafkaConfig, serializer: Serializer[T]): Unit

    Publishes synchronously a message to the running Kafka broker.

    Publishes synchronously a message to the running Kafka broker.

    topic

    the topic to which publish the message (it will be auto-created)

    message

    the message of type T to publish

    config

    an implicit EmbeddedKafkaConfig

    serializer

    an implicit Serializer for the type T

    Definition Classes
    EmbeddedKafkaSupport
    Annotations
    @throws( classOf[KafkaUnavailableException] )
    Exceptions thrown

    KafkaUnavailableException if unable to connect to Kafka

  22. def start()(implicit config: EmbeddedKafkaConfig): Unit

    Starts a ZooKeeper instance and a Kafka broker in memory, using temporary directories for storing logs.

    Starts a ZooKeeper instance and a Kafka broker in memory, using temporary directories for storing logs. The log directories will be cleaned after calling the stop() method or on JVM exit, whichever happens earlier.

    config

    an implicit EmbeddedKafkaConfig

  23. def startKafka(kafkaLogDir: Directory)(implicit config: EmbeddedKafkaConfig): Unit

    Starts a Kafka broker in memory, storing logs in a specific location.

    Starts a Kafka broker in memory, storing logs in a specific location.

    kafkaLogDir

    the path for the Kafka logs

    config

    an implicit EmbeddedKafkaConfig

  24. def startKafka(config: EmbeddedKafkaConfig, kafkaLogDir: Directory): KafkaServer
    Definition Classes
    EmbeddedKafkaSupport
  25. def startZooKeeper(zkLogsDir: Directory)(implicit config: EmbeddedKafkaConfig): Unit

    Starts a Zookeeper instance in memory, storing logs in a specific location.

    Starts a Zookeeper instance in memory, storing logs in a specific location.

    zkLogsDir

    the path for the Zookeeper logs

    config

    an implicit EmbeddedKafkaConfig

  26. def startZooKeeper(zooKeeperPort: Int, zkLogsDir: Directory): ServerCnxnFactory
    Definition Classes
    EmbeddedKafkaSupport
  27. def stop(): Unit

    Stops the in memory ZooKeeper instance and Kafka broker, and deletes the log directories.

  28. def stopKafka(): Unit

    Stops the in memory Kafka instance, preserving the logs directory.

  29. def stopZooKeeper(): Unit

    Stops the in memory Zookeeper instance, preserving the logs directory.

  30. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  31. def toString(): String
    Definition Classes
    AnyRef → Any
  32. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. def withRunningKafka(body: ⇒ Any)(implicit config: EmbeddedKafkaConfig): Any

    Starts a ZooKeeper instance and a Kafka broker, then executes the body passed as a parameter.

    Starts a ZooKeeper instance and a Kafka broker, then executes the body passed as a parameter.

    body

    the function to execute

    config

    an implicit EmbeddedKafkaConfig

    Definition Classes
    EmbeddedKafkaSupport
  36. val zkConnectionTimeoutMs: Int
    Definition Classes
    EmbeddedKafkaSupport
  37. val zkSecurityEnabled: Boolean
    Definition Classes
    EmbeddedKafkaSupport
  38. val zkSessionTimeoutMs: Int
    Definition Classes
    EmbeddedKafkaSupport
  39. object aKafkaProducer
    Definition Classes
    EmbeddedKafkaSupport

Inherited from EmbeddedKafkaSupport

Inherited from AnyRef

Inherited from Any

Ungrouped