1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-24 08:52:31 +02:00
dockerfiles/kafka/README.md
2019-12-03 19:16:02 +08:00

815 B

kafka

How It Works

read more

Up and Running

# Broker
$ docker-compose up -d
$ docker-compose exec kafka bash
>>> kafka-topics.sh --create --zookeeper zookeeper:2181 --replication-factor 1 --partitions 2 --topic my-topic
>>> kafka-topics.sh --alert --zookeeper zookeeper:2181 --topic my-topic --config retention.hours=168
>>> kafka-topics.sh --alert --zookeeper zookeeper:2181 --topic my-topic --delete-config retention.hours
>>> exit

# Producer
$ kafkacat -P -b localhost:9092 -t my-topic

# Consumer
$ kafkacat -C -b localhost:9092 -t my-topic -o end -u -q | jq .

Monitoring

https://telegraf-kafka.readthedocs.io/en/stable/index.html