Most Useful Kafka Testing Tools

Written by sergeishaikin | Published 2022/02/17
Tech Story Tags: apache-kafka | kafka-consumer | kafka-testing-tools | kafka-console-consumer | lenses | cmak | kafka-manager | kafdrop

TLDRKafka is an integral part of the development process for high-load services and applications. Kafka isn't only a message broker but also a log splitter. With the help of Kafka, we can simulate various test scenarios. We need a tool for working with Kafka that allows us to work with Kafka. In this article, we will consider the most popular tools and touch on their functionality and capabilities. The Kafka Tool is a JVM application and requires Java to be installed to run, but you can do without it in this case.via the TL;DR App

Introduction

In many companies, the use of Kafka is an integral part of the development process for high-

load services and applications. Kafka isn't only a message broker but also a log splitter. In

addition, with the help of Kafka, we can simulate various test scenarios. But to put this into

practice, we need a tool for working with Kafka. So in today's topic, we will consider the most

popular tools and touch on their functionality and capabilities.

Kafka Tool

One of the most popular tools for working with Kafka is the Kafka Tool. Its interface is pretty

straightforward, and as the saying goes, the simpler, the better. This tool allows all our

clusters, including all brokers, to view lists of topics and consumers. And in topics, we can

read messages.

This information is beneficial while testing various services that read topics

and write to Kafka topics, but this is far from the full functionality of the Kafka Tool. Here, we

can create your topics and partitions, which allows us to replace them in the configuration file

with fake ones (created by the tester).

Next, we can modify a specific message and send it to the topic we need, achieving our desired result.

Kafka Console Consumer

It is one of the applications that comes with Kafka, which allows reading data from it. Like

Kafka itself is a JVM application and requires Java to be installed to run. The Kafka Tool

also requires Java, but you can do without it in this case. To do this, we must run the Kafka

Console Consumer via docker:

You need to add docker run --rm -it taion809/kafka-cli:2.2.0 before the command itself.

We're requesting here to run our image, display it all on our screen, and then delete that

image when we finish.

Lenses

Another tool provides us with a user interface for monitoring Kafka clusters and at the same

time offers quick access to data in messages. Lenses offer Kafka topics UI, a web-based

tool for searching for topics, viewing their metadata, and downloading the messages

themselves. We can also use this tool to set up real-time alerts, making it easier to manage

incidents effectively.

Lenses are possible to run in a docker container, and this tool is

relatively lightweight, which will take only 4 GB.

CMAK (former Kafka Manager)

CMAK has a pretty good and relatively simple user interface. It allows to flexibly manage

clusters, topics, and users and also monitor the performance of brokers, producers, and

consumers. Moreover, it'll help us reassign existing partitions, delete or update their

configuration.

Kafdrop

An open-source user interface for Kafka clusters displays information about brokers, topics,

and sections and allows viewing messages. This lightweight Spring Boot application requires

minimal configuration.

Conclusion

Each of the above tools has a place to be in the tester's work. However, Kafka Tool still

seems the most convenient and valuable due to its extended functionality and additional

features for creating various test scenarios. Of course, there are some inconveniences of

sending a message with multiple headers. Due to the lack of a worthy alternative, this has to

be put up with, hoping that it will be improved in future versions.


Written by sergeishaikin | I'm software tester. And I like backend testing.
Published by HackerNoon on 2022/02/17