Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maksim-paskal/kafka-topic-admin
https://github.com/maksim-paskal/kafka-topic-admin
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/maksim-paskal/kafka-topic-admin
- Owner: maksim-paskal
- License: apache-2.0
- Created: 2021-08-01T03:32:50.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-25T04:20:18.000Z (almost 2 years ago)
- Last Synced: 2024-06-21T09:49:26.656Z (7 months ago)
- Language: Go
- Size: 23.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Kafka topics administration
Since librdkafka v1.6.0 - the consumer no longer triggers topic auto creation (regardless of allow.auto.create.topics=..) for subscribed topics. The recommendation is not to rely on auto topic creation at all, but to use the Admin API to create topics.This tool can create/delete/list kafka topics with Admin API
# Usage
```bashcat <>.env
KAFKA_BOOTSTRAP_SERVERS=broker:9092
KAFKA_SECURITY_PROTOCOL=SASL_SSL
KAFKA_SASL_MECHANISMS=PLAIN
KAFKA_SASL_USERNAME=login
KAFKA_SASL_PASSWORD=password
EOF# use latest docker image
docker pull paskalmaksim/kafka-topic-admin:latest# create topics
docker run -it --rm \
--env-file=.env \
paskalmaksim/kafka-topic-admin:latest \
-mode=create \
-topics=test1,test2# delete topics
docker run -it --rm \
--env-file=.env \
paskalmaksim/kafka-topic-admin:latest \
-mode=delete \
-topics=test1,test2# list all topics
docker run -it --rm \
--env-file=.env \
paskalmaksim/kafka-topic-admin:latest \
-mode=list-topics
```# Metrics
```
docker run -it --rm \
-p 9308:9308 \
danielqsj/kafka-exporter:latest \
--kafka.server=broker:9092 \
--sasl.enabled \
--sasl.mechanism="plain" \
--sasl.username="username" \
--sasl.password="password" \
--tls.enabled \
--tls.insecure-skip-tls-verify
```