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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With