Web UI for managing Kafka Message Scheduler instances — full and mini (demo) images available.
498
To run the scheduler admin you can use docker, it will need a scheduler to connect to, you can specify in the variable env. SCHEDULERS_ADDR for example: SCHEDULERS_ADDR=scheduler.
docker run -d -p 9000:9000 -e SCHEDULERS_ADDR=<schedulers-address> yabbes/kafka-message-scheduler-admin
The mini version is a "mocked" version of the admin all in one, for demonstration purpose
docker run -d -p 9000:9000 yabbes/kafka-message-scheduler-admin:mini
Then open browser at localhost:9000
The server exposes two ports:
9000 is the server port.9001 is the port for exposing prometheus metrics./ will expose the user interface/api will expose the api endpoints/api/health lightweight health check
For the full API reference, see API.md.| Env. variable | Default | Description |
|---|---|---|
| LOG_LEVEL | info | logging level (panic, fatal, error, warning, info, debug, trace) |
| GRAYLOG_SERVER | graylog server address | |
| METRICS_ADDR | :9001 | prometheus metrics port |
| SERVER_ADDR | :9000 | server address port |
| SCHEDULERS_ADDR | localhost:8000 | comma separated list of address of schedulers, may or may not contain port (default port is 8000), for example: SCHEDULERS_ADDR=scheduler1,scheduler2:8000 |
| STATIC_FILES_DIR | ../client/build | location of the UI static files for the HTML & js files |
| DATA_ROOT_DIR | ./.db | Default location of internal database files |
| API_SERVER_ONLY | false | when true, only the rest api is exposed without serving the static files and default route is / (instead of /api) |
| KAFKA_MESSAGE_BODY_DECODER | set an endpoint for decoding kafka message payload. Post with payload {id:xxx target-topic:yyy value:[base64 of the kafka message body]} | |
| PPROF_ENABLED | false | when true, exposes Go pprof endpoints on the metrics server |
corepack enable && corepack prepare pnpm@latest --activate)For development you will need external dependencies such as kafka, in order to start this dependencies you can run:
make up: startup development environment with external dependencies (kafka, scheduler, ...)make down: shutdown development environment
The backend is written in Go. You can use the following commands to manage the development lifecycle:make start: start GO servermake build: compile the codemake bin: generate a binarymake lint: run static analysis on the codemake test: execute unit testsmake test.integration: execute integration testsmake tests: execute all testsmake tests.docker: execute all tests in "black box" inside docker containerscd server
make up
make start
For development you will need a running admin server launched as described before or the mini version of the scheduler admin which is running without any external dependencies:
docker run -p 9000:9000 yabbes/kafka-message-scheduler-admin:mini: startup mini version of the scheduler (no external dependencies required)
or start a standard admin servermake start (inside /server): startup GO server on local
The frontend is written with TypeScript and React. You can use the following commands to manage the development lifecycle:pnpm install: install the dependenciespnpm start: start the frontend in development mode with Vite HMRpnpm run build: generate the transpiled and minified files and assetspnpm test: execute unit tests
To start the dev server: pnpm install && pnpm start
Then open browser at: http://localhost:3000cd client
docker run -d -p 9000:9000 yabbes/kafka-message-scheduler-admin:mini
pnpm install
pnpm start
This fork includes the following improvements over the original repository:
ReadHeaderTimeout on all HTTP servers (CVE mitigation)PPROF_ENABLED env varca-certificates in Docker imagehighlight.js direct usage (replaced unmaintained react-highlight)hmap.NewSchedulerSchedules()time.Until(start) → time.Since(start) timing bugDecodeJSON ignoring timeout parametergetBool() to use strconv.ParseBoolKafkaMessageBodyDecoder() empty string bugfmt.Printf debug statements (use structured logging)/health endpointContent type
Image
Digest
sha256:c5ccd874d…
Size
26.9 MB
Last updated
4 months ago
docker pull yabbes/kafka-message-scheduler-admin:mini