Skip to content

flentini/artillery-engine-kafka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Artillery.io Kafka Plugin

Load Test Kafka with Artillery

It uses kafka-node under the hood

Usage

Install the plugin

# If Artillery is installed globally:
npm install -g artillery-engine-kafka

Define a scenario

config:
  target: "kafka_topic"
  kafka:
    client:
      kafkaHost: "localhost:9092"
  phases:
    - duration: 10
      arrivalRate: 5
  engines:
    kafka: {}

scenarios:
  - name: "Send message to cluster"
    engine: kafka
    flow:
      - publishMessage:
          # destination topic, required
          topic: "myTestTopic"
          # size of the batch, default 1
          batch: 10
          # size of the message in bytes, default 300.
          # Ignored if data is defined
          size: 500
          # message payload, takes precedence over size parameter
          # it can be an object or a string
          data:
            name: "Mr Charles J. Message"
            location: "London, UK"
          # partition to hit. If set the producer will be an instance of Producer. Default 0
          partition: 1

Run the scenario

artillery run my-scenario.yml

About

load test kafka with artillery.io

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published