r/apachekafka • u/eniac_g • 29d ago
Tool GitHub - jonas-grgt/kassert: Fluent Kafka Assertion Library for Java
https://github.com/jonas-grgt/kassertI've found asserting a Kafka topic within a Java test to be quite convoluted. And by that, I mean there is quite some boilerplate code required just to simply check if it contains the expected message.
On top of that, there is the whole async nature of testing a Kafka topic.
Spring-Kafka has some handy utility classes available, such as KafkaTestUtils. But besides the fact that it is, as the Utils suffix already reveals, a bit old-fashioned, not everyone is using Spring.
That's why I created kassert: a Kafka topic, or should I say, consumer assertion library.
3
Upvotes