rabik/kafka-message-producer

By rabik

Updated 3 months ago

A web-based Kafka message producer with UI for sending single, interval, and batch messages

Image
Message queues
Developer tools
0

1.0K

rabik/kafka-message-producer repository overview

Kafka Message Producer

A lightweight, web-based Kafka message producer with a built-in UI. Connect to any Kafka broker and send messages in three modes — perfect for testing, debugging, and demos.

Features

  • Single message — send one message at a time
  • Batch (count) — send up to 10,000 messages in one shot
  • Interval — continuously send messages at a configurable interval
  • Custom message structure — define topic, key, value (JSON or plain text), and headers
  • Multi-platform — runs on linux/amd64 and linux/arm64 (Intel, AMD, Apple Silicon)

Quick Start

docker run -p 8990:8990 rabik/kafka-message-producer

Open http://localhost:8990 in your browser, enter your Kafka broker address, and start producing.

Docker Compose (with Kafka)

If you need a full stack with Kafka included:

services:
  zookeeper:
    image: confluentinc/cp-zookeeper:7.6.0
    environment:
      ZOOKEEPER_CLIENT_PORT: 2181
    ports:
      - "2181:2181"

  kafka:
    image: confluentinc/cp-kafka:7.6.0
    depends_on:
      - zookeeper
    ports:
      - "9092:9092"
    environment:
      KAFKA_BROKER_ID: 1
      KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
      KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1

  producer-ui:
    image: rabik/kafka-message-producer
    ports:
      - "8990:8990"
    depends_on:
      - kafka
docker compose up -d

Then open http://localhost:8990 and connect to localhost:9092.

Environment Variables

VariableDefaultDescription
PORT8990HTTP server port

API

The UI calls these REST endpoints — you can also use them directly:

MethodPathBody
POST/api/connect{ brokers, clientId? }
POST/api/disconnect
POST/api/produce/single{ topic, key?, value, headers? }
POST/api/produce/count{ topic, key?, value, headers?, count }
POST/api/produce/interval{ topic, key?, value, headers?, intervalMs }
POST/api/produce/interval/stop{ intervalId? } (omit to stop all)
GET/api/status

Supported Architectures

ArchitectureTag
x86-64latest
arm64latest

Source Code

GitHub

Tag summary

Content type

Image

Digest

sha256:3851eb7c1

Size

56.6 MB

Last updated

3 months ago

docker pull rabik/kafka-message-producer:7.2