Package

net.manub.embeddedkafka

streams

Permalink

package streams

Visibility
  1. Public
  2. All

Type Members

  1. trait EmbeddedKafkaStreams extends EmbeddedKafka with TestStreamsConfig

    Permalink

    Helper trait for testing Kafka Streams.

    Helper trait for testing Kafka Streams. It creates an embedded Kafka Instance for each test case. Use runStreams to execute your streams.

  2. trait EmbeddedKafkaStreamsAllInOne extends EmbeddedKafkaStreams with Consumers

    Permalink

    Convenience trait for testing Kafka Streams with ScalaTest.

    Convenience trait for testing Kafka Streams with ScalaTest. It exposes EmbeddedKafkaStreams.runStreams as well as Consumers api for easily creating and querying consumers in tests.

    e.g.

    runStreams(Seq("inputTopic", "outputTopic", streamTopology) {
     withConsumer[String, String, Unit] { consumer =>
       // here you can publish and consume messages and make assertions
       publishToKafka(in, Seq("one-string", "another-string"))
       consumeLazily(out).take(2).toList should be (
         Seq("one-string" -> "true", "another-string" -> "true")
       )
     }
    }
    See also

    EmbeddedKafkaStreams

    Consumers

  3. trait TestStreamsConfig extends AnyRef

    Permalink

    Mixin trait for tests allowing to easily create Kafka Stream configurations for tests.

Ungrouped