Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/anvouk/kafka-stresser

A very simple and minimal kafka consumer/producer stresser
https://github.com/anvouk/kafka-stresser

backend java kafka kafka-cluster stresser

Last synced: 11 days ago
JSON representation

A very simple and minimal kafka consumer/producer stresser

Awesome Lists containing this project

README

        

# Kafka Stresser

Apache kafka consumer/producer stresser with simple REST api.

## Prerequisites

Ensure the followings are present in your kafka cluster:

- `KAFKA_AUTO_CREATE_TOPICS: "true"`
- `KAFKA_NUM_PARTITIONS: `

## Usage

set `KAFKA_SERVERS` env with the addresses of your kafka cluster before running the stresser.

To start a new stress test with 10 topics each with 100 partitions (`KAFKA_NUM_PARTITIONS` >= 100):
```bash
curl -X POST 'http://localhost:8080/api/start' \
--header 'Content-Type: application/json' \
--data-raw '{
"topicsCount": 10,
"partitionsPerTopic": 100
}'
```

To stop the session:
```bash
curl -X POST 'http://localhost:8080/api/stop'
```