1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-28 09:08:50 +02:00
dockerfiles/kafka
2018-10-24 16:49:26 +08:00
..
arm update superset 2018-07-28 10:51:01 +08:00
cluster add kafka cluster 2018-10-24 16:49:26 +08:00
docker-compose.yml update kafka 2018-07-27 00:37:40 +08:00
README.md update kafka 2018-07-27 14:46:38 +08:00

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 .