Test Kafka
Make sure all of your systems that rely on real-time data streaming with Kafka are properly tested with NeoLoad.
When you integrate NeoLoad with Kafka, you can simulate the production of messages to Kafka topics and the consumption of messages from them. That means you can analyze performance bottlenecks and system behavior under stress and guarantee your Kafka-based applications can handle expected loads.
Load test Kafka messaging
With NeoLoad, you have to manually connect or disconnect from Kafka. Your first execution automatically opens a connection, whether you're sending or receiving a message.
The connection stays open by default. To close the connection use the close parameter and set it to true
. If you want NeoLoad to create a new action for sending and receiving from Kafka set the close_receiver parameter to true
.
Send a message to a Kafka topic
To test sending messages to a specific Kafka topic, navigate to Kafka in Messaging and open Send Message. Then, enter the following Parameters:
-
bootstrap.servers (required): Specifies Kafka cluster connection points.
-
topic (required): Identifies the target topic for message publication.
-
key (optional): Associates a key with the message.
-
value (required): Contains the message content you want to publish.
Additional Parameters, such as headers, key.serializer, value.serializer, acks, retries, buffer.memory, batch.size, and compression.type enable detailed configuration, optimizing message sending according to testing needs.
Send a message to Kafka.
-
bootstrap.servers: localhost: 29092
-
topic: test
-
value: hello world!
Sending a Kafka message to a topic from NeoLoad
Receive messages from a Kafka topic
To test receiving messages from a specific Kafka topic, navigate to Kafka in Messaging and open Receive Messages. Then, enter the following Parameters:
Parameters
-
bootstrap.servers (required): Specifies Kafka cluster connection points.
-
topic (required): Designates the source topic for message consumption.
-
timeout (required): Determines the maximum wait time for incoming messages.
-
group.id (optional): Specifies the consumer group the Kafka topic belongs to for message consumption.
Additional Parameters, such as key.deserializer, value.deserializer, max.poll.records, failOnTimeout and close offer flexibility, tailoring message reception to multiple load testing scenarios.
Recieve a message from Kafka.
-
bootstrap.servers: localhost:29092
-
topic: test
-
timeout: 30000
-
group.id: group
Receiving a Kafka message from a topic in NeoLoad
What's next
Want to record your load test cases, faster? Check out other test design elements that can help you on your load testing journey:
You're done reading? Design a test scenario and jump right into NeoLoad load performance testing.