1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00
dockerfiles/kafka/README.md

31 lines
815 B
Markdown
Raw Normal View History

2018-07-22 14:57:36 +02:00
kafka
=====
2018-07-26 10:55:19 +02:00
## How It Works
![](https://github.com/wurstmeister/kafka-docker/wiki/kafka-communication.png)
[read more](https://github.com/wurstmeister/kafka-docker/wiki/Connectivity)
## Up and Running
```bash
# 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
2018-07-27 08:46:38 +02:00
>>> 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
2018-07-26 10:55:19 +02:00
>>> exit
# Producer
$ kafkacat -P -b localhost:9092 -t my-topic
# Consumer
2018-07-27 08:46:38 +02:00
$ kafkacat -C -b localhost:9092 -t my-topic -o end -u -q | jq .
2018-07-26 10:55:19 +02:00
```
2019-12-03 13:16:02 +02:00
## Monitoring
https://telegraf-kafka.readthedocs.io/en/stable/index.html