Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Embedded Kafka for testing without spring [closed]

Is there any framework/tool which can provide Embedded Kafka instance (Kafka Brokers) without any dependency of spring in Java/Scala?

Can someone please provide a working example of it?

like image 310
nomadSK25 Avatar asked Jul 16 '19 07:07

nomadSK25


1 Answers

You have several options.

Check out the samples on Confluent examples repo, they use embedded instances of Kafka, ZooKeeper, and Confluent Schema Registry (an example: https://github.com/confluentinc/kafka-streams-examples/blob/65f770c75988afc33d3813a1aa4f9f7818fe81d8/src/test/java/io/confluent/examples/streams/WikipediaFeedAvroExampleTest.java#L51)

TestContainers might be another alternative.

Citrus has also support for that.

If you are using Scala, check out the Embedded Kafka library

like image 151
Sergi Almar Avatar answered Nov 12 '22 04:11

Sergi Almar