Packages

t

net.manub.embeddedkafka.schemaregistry.streams

EmbeddedKafkaStreamsWithSchemaRegistryAllInOne

trait EmbeddedKafkaStreamsWithSchemaRegistryAllInOne extends EmbeddedKafkaStreamsWithSchemaRegistry with Consumers

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.

See also

Consumers

EmbeddedKafkaStreamsWithSchemaRegistry

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EmbeddedKafkaStreamsWithSchemaRegistryAllInOne
  2. Consumers
  3. EmbeddedKafkaStreamsWithSchemaRegistry
  4. TestStreamsConfig
  5. EmbeddedKafkaWithSchemaRegistry
  6. EmbeddedKafkaWithSchemaRegistrySupport
  7. EmbeddedKafkaSupport
  8. AnyRef
  9. 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 baseConsumerConfig(implicit config: EmbeddedKafkaConfigWithSchemaRegistry): Map[String, AnyRef]
    Definition Classes
    EmbeddedKafkaWithSchemaRegistry → EmbeddedKafkaSupport
  6. def baseProducerConfig(implicit config: EmbeddedKafkaConfigWithSchemaRegistry): Map[String, AnyRef]
    Definition Classes
    EmbeddedKafkaWithSchemaRegistry → EmbeddedKafkaSupport
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. def consumeFirstKeyedMessageFrom[K, V](topic: String, autoCommit: Boolean)(implicit config: EmbeddedKafkaConfigWithSchemaRegistry, keyDeserializer: Deserializer[K], valueDeserializer: Deserializer[V]): (K, V)
    Definition Classes
    EmbeddedKafkaSupport
    Annotations
    @throws( ... ) @throws( ... )
  9. def consumeFirstMessageFrom[V](topic: String, autoCommit: Boolean)(implicit config: EmbeddedKafkaConfigWithSchemaRegistry, valueDeserializer: Deserializer[V]): V
    Definition Classes
    EmbeddedKafkaSupport
    Annotations
    @throws( ... ) @throws( ... )
  10. def consumeFirstStringMessageFrom(topic: String, autoCommit: Boolean)(implicit config: EmbeddedKafkaConfigWithSchemaRegistry): String
    Definition Classes
    EmbeddedKafkaSupport
  11. def consumeNumberKeyedMessagesFrom[K, V](topic: String, number: Int, autoCommit: Boolean)(implicit config: EmbeddedKafkaConfigWithSchemaRegistry, keyDeserializer: Deserializer[K], valueDeserializer: Deserializer[V]): List[(K, V)]
    Definition Classes
    EmbeddedKafkaSupport
  12. def consumeNumberKeyedMessagesFromTopics[K, V](topics: Set[String], number: Int, autoCommit: Boolean, timeout: Duration, resetTimeoutOnEachMessage: Boolean)(implicit config: EmbeddedKafkaConfigWithSchemaRegistry, keyDeserializer: Deserializer[K], valueDeserializer: Deserializer[V]): Map[String, List[(K, V)]]
    Definition Classes
    EmbeddedKafkaSupport
  13. def consumeNumberMessagesFrom[V](topic: String, number: Int, autoCommit: Boolean)(implicit config: EmbeddedKafkaConfigWithSchemaRegistry, valueDeserializer: Deserializer[V]): List[V]
    Definition Classes
    EmbeddedKafkaSupport
  14. def consumeNumberMessagesFromTopics[V](topics: Set[String], number: Int, autoCommit: Boolean, timeout: Duration, resetTimeoutOnEachMessage: Boolean)(implicit config: EmbeddedKafkaConfigWithSchemaRegistry, valueDeserializer: Deserializer[V]): Map[String, List[V]]
    Definition Classes
    EmbeddedKafkaSupport
  15. def consumeNumberStringMessagesFrom(topic: String, number: Int, autoCommit: Boolean)(implicit config: EmbeddedKafkaConfigWithSchemaRegistry): List[String]
    Definition Classes
    EmbeddedKafkaSupport
  16. def createCustomTopic(topic: String, topicConfig: Map[String, String], partitions: Int, replicationFactor: Int)(implicit config: EmbeddedKafkaConfig): Unit
    Definition Classes
    EmbeddedKafkaSupport
  17. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  19. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  22. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  23. def kafkaConsumer[K, T](implicit config: EmbeddedKafkaConfigWithSchemaRegistry, keyDeserializer: Deserializer[K], deserializer: Deserializer[T]): KafkaConsumer[K, T]
    Definition Classes
    EmbeddedKafkaSupport
  24. def kafkaProducer[K, T](topic: String, key: K, message: T)(implicit config: EmbeddedKafkaConfigWithSchemaRegistry, keySerializer: Serializer[K], serializer: Serializer[T]): KafkaProducer[K, T]
    Definition Classes
    EmbeddedKafkaSupport
  25. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. def newConsumer[K, V]()(implicit arg0: Deserializer[K], arg1: Deserializer[V], config: EmbeddedKafkaConfig): KafkaConsumer[K, V]
    Definition Classes
    Consumers
  27. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. def publishStringMessageToKafka(topic: String, message: String)(implicit config: EmbeddedKafkaConfigWithSchemaRegistry): Unit
    Definition Classes
    EmbeddedKafkaSupport
  30. def publishToKafka[K, T](topic: String, messages: Seq[(K, T)])(implicit config: EmbeddedKafkaConfigWithSchemaRegistry, keySerializer: Serializer[K], serializer: Serializer[T]): Unit
    Definition Classes
    EmbeddedKafkaSupport
    Annotations
    @throws( ... )
  31. def publishToKafka[K, T](topic: String, key: K, message: T)(implicit config: EmbeddedKafkaConfigWithSchemaRegistry, keySerializer: Serializer[K], serializer: Serializer[T]): Unit
    Definition Classes
    EmbeddedKafkaSupport
    Annotations
    @throws( ... )
  32. def publishToKafka[T](producerRecord: ProducerRecord[String, T])(implicit config: EmbeddedKafkaConfigWithSchemaRegistry, serializer: Serializer[T]): Unit
    Definition Classes
    EmbeddedKafkaSupport
    Annotations
    @throws( ... )
  33. def publishToKafka[T](topic: String, message: T)(implicit config: EmbeddedKafkaConfigWithSchemaRegistry, serializer: Serializer[T]): Unit
    Definition Classes
    EmbeddedKafkaSupport
    Annotations
    @throws( ... )
  34. def runStreams[T](topicsToCreate: Seq[String], topology: Topology, extraConfig: Map[String, AnyRef] = Map.empty)(block: ⇒ T)(implicit config: EmbeddedKafkaConfigWithSchemaRegistry): T

    Execute Kafka streams and pass a block of code that can operate while the streams are active.

    Execute Kafka streams and pass a block of code that can operate while the streams are active. The code block can be used for publishing and consuming messages in Kafka.

    topicsToCreate

    the topics that should be created in Kafka before launching the streams.

    topology

    the streams topology that will be used to instantiate the streams with a default configuration (all state directories are different and in temp folders)

    extraConfig

    additional KafkaStreams configuration (overwrite existing keys in default config)

    block

    the code block that will executed while the streams are active. Once the block has been executed the streams will be closed.

    Definition Classes
    EmbeddedKafkaStreamsWithSchemaRegistry
  35. def runStreamsWithStringConsumer(topicsToCreate: Seq[String], topology: Topology)(block: (KafkaConsumer[String, String]) ⇒ Any)(implicit config: EmbeddedKafkaConfigWithSchemaRegistry): Any

    Run Kafka Streams while offering a String-based consumer for easy testing of stream output.

    Run Kafka Streams while offering a String-based consumer for easy testing of stream output.

    topicsToCreate

    the topics that should be created. Usually these should be the topics that the Streams-under-test use for inputs and outputs. They need to be created before running the streams and this is automatically taken care of.

    topology

    the streams topology that will be instantiated

    block

    the block of testing code that will be executed by passing the simple String-based consumer.

    returns

    the result of the testing code

  36. def startKafka(config: EmbeddedKafkaConfig, kafkaLogDir: Directory): KafkaServer
    Definition Classes
    EmbeddedKafkaSupport
  37. def startSchemaRegistry(schemaRegistryPort: Int, zooKeeperPort: Int, avroCompatibilityLevel: AvroCompatibilityLevel = AvroCompatibilityLevel.NONE, properties: Properties = new Properties): RestApp
    Attributes
    protected
    Definition Classes
    EmbeddedKafkaWithSchemaRegistrySupport
  38. def startZooKeeper(zooKeeperPort: Int, zkLogsDir: Directory): ServerCnxnFactory
    Definition Classes
    EmbeddedKafkaSupport
  39. def streamConfig(streamName: String, extraConfig: Map[String, AnyRef])(implicit kafkaConfig: EmbeddedKafkaConfig): StreamsConfig
    Definition Classes
    TestStreamsConfig
  40. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  41. def toString(): String
    Definition Classes
    AnyRef → Any
  42. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  45. def withConsumer[K, V, T](block: (KafkaConsumer[K, V]) ⇒ T)(implicit arg0: Deserializer[K], arg1: Deserializer[V], config: EmbeddedKafkaConfig): T
    Definition Classes
    Consumers
  46. def withRunningKafka[T](body: ⇒ T)(implicit config: EmbeddedKafkaConfigWithSchemaRegistry): T

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

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

    body

    the function to execute

    config

    an implicit EmbeddedKafkaConfig

    Definition Classes
    EmbeddedKafkaWithSchemaRegistrySupport
  47. def withRunningKafka[T](body: ⇒ T)(implicit config: EmbeddedKafkaConfig): T
    Definition Classes
    EmbeddedKafkaSupport
  48. def withRunningKafkaOnFoundPort[T](config: EmbeddedKafkaConfigWithSchemaRegistry)(body: (EmbeddedKafkaConfigWithSchemaRegistry) ⇒ T): T

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

    Starts a ZooKeeper instance, a Kafka broker and a Schema Registry app, then executes the body passed as a parameter. The actual ZooKeeper, Kafka, and Schema Registry ports will be detected and inserted into a copied version of the EmbeddedKafkaConfig that gets passed to body. This is useful if you set any port to 0, which will listen on an arbitrary available port.

    config

    the user-defined EmbeddedKafkaConfig

    body

    the function to execute, given an EmbeddedKafkaConfig with the actual ports Kafka, ZooKeeper, and Schema Registry are running on

    Definition Classes
    EmbeddedKafkaWithSchemaRegistrySupport
  49. def withRunningKafkaOnFoundPort[T](config: EmbeddedKafkaConfig)(body: (EmbeddedKafkaConfig) ⇒ T): T
    Definition Classes
    EmbeddedKafkaSupport
  50. def withStringConsumer[T](block: (KafkaConsumer[String, String]) ⇒ T)(implicit config: EmbeddedKafkaConfig): T
    Definition Classes
    Consumers
  51. val zkConnectionTimeoutMs: Int
    Definition Classes
    EmbeddedKafkaSupport
  52. val zkSessionTimeoutMs: Int
    Definition Classes
    EmbeddedKafkaSupport

Inherited from Consumers

Inherited from TestStreamsConfig

Inherited from EmbeddedKafkaSupport[EmbeddedKafkaConfigWithSchemaRegistry]

Inherited from AnyRef

Inherited from Any

Ungrouped