Skip to content

ineat/kloadgen-jmeter-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

kloadgen-jmeter-example

This repository illustrate how to use KLoadGen with jMeter in order to stress a Kafka ecosystem ;

For further details, see this related blog post.

Prerequisites

jMeter, obviously

Open jMeter and load the turn-on-usecase.jmx when you jMeter env is ready

Kafka and a Schema Registry

If you have no access to a Kafka Broker with a Schema Registry, you can start the following services:

  • Kafka by running the awesome zk-single-kafka-multiple with docker compose -f zk-multiple-kafka-single.yml up
  • The APICURIO schema registry by running docker run -it -p 8080:8080 apicurio/apicurio-registry-mem:latest-snapshot

you need to create a topic named smartylighting.streetlights.1.0.action.test.turn.on

Register the turnOnPayload avro schema

When your registry is started, call the following HTTP request in order to publish the schema into the registry

curl --location 'http://localhost:8080/apis/registry/v2/groups/my-group/artifacts' \
--header 'Content-Type: application/json; artifactType=AVRO' \
--header 'X-Registry-ArtifactId: turnOnOffPayload' \
--data '{
  "type": "record",
  "name": "turnOnOffPayload",
  "namespace": "com.ineat.kloadgen.example",
  "fields": [
    {
      "docs": "Whether to turn on or off the light.",
      "name": "command",
      "type": {"name": "CommandOpts", "type": "enum", "symbols": ["on", "off"]}
    },
    {"name": "sentAt",
    "type" : {
        "type" : "long",
        "logicalType" : "timestamp-millis"
      },
      "docs": "Date and time when the message was sent."}

  ]
}
'

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published