Registry / testing / kafka-junit

kafka-junit

JSON →
library4.2.10javamavenunverified

JUnit rule that spins up an embedded Kafka broker for integration testing of Kafka-based applications.

<dependency> <groupId>com.github.charithe</groupId> <artifactId>kafka-junit</artifactId> <version>4.2.10</version> </dependency>
INSTALL
IMPORT
SIG · KAFKA-JUNIT
K
kafka-junit
testingjavav4.2.10
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

KafkaJunitRule
com.github.charithe.kafka.KafkaJunitRule

Sets up an embedded Kafka broker for testing using JUnit rule.

import com.github.charithe.kafka.KafkaJunitRule; import org.junit.Rule; import org.junit.Test; public class KafkaTest { @Rule public KafkaJunitRule kafkaRule = new KafkaJunitRule(); @Test public void testProduceConsume() { // use kafkaRule.getHelper() to interact } }
Debug
Known issues
breakingVersion 4.x requires Kafka 2.x; check compatibility with your Kafka client version.
fix
Use kafka-junit version matching your Kafka client version (e.g., 4.2.x for Kafka 2.x).
affects: >=4.0.0 <5.0.0
Upgrade
Version history
4.2.10latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
14
OpenAI (training)
1
Resources
kafka-junit — mvn dependency:get kafka-junit · libregistry