How to implement automatic tests for reading kafka messages as a consumer

Viewed 67

I need to write tests for an application which is integrated with Kafka and sends event messages to a remote Kafka server. My goal is to ensure, as a consumer, that those messages are created and to check their content, if that is possible.

I looked through Kafka documentation and found the consumer API is where I am supposed to start but I’m unsure how to start implementing it.

1 Answers

If you want to stay away from programming much, you can configure Mockintosh's "Validating Consumer" (https://mockintosh.io/Async.html#validating-consumer).

Then you can validate the facts of message created via simple HTTP calls to Mockintosh API. Also there is UI to see those messages ad-hoc.

Related