3 if [ "$1" = "cleanup" ]
5 docker-compose -f docker/docker-compose.yml down -t0 -v --remove-orphans
9 docker-compose -f docker/docker-compose.yml up -d --remove-orphans zookeeper kafka-1 kafka-2 kafka-3
10 docker-compose -f docker/docker-compose.yml ps
11 echo "Waiting for the Kafka-Cluster to become ready..."
12 docker-compose -f docker/docker-compose.yml run --rm cli cub kafka-ready -b kafka:9092 3 60 > /dev/null 2>&1 || exit 1
14 docker-compose -f docker/docker-compose.yml up -t0 -d cli
16 docker-compose -f docker/docker-compose.yml logs setup
19 echo "Hilfe-Ausgabe von kafkacat"
21 docker-compose -f docker/docker-compose.yml exec -T cli kafkacat -h
23 echo "Nachrichten schreiben mit kafkacat"
25 docker-compose -f docker/docker-compose.yml exec -T cli kafkacat -P -b kafka:9092 -t test << EOF
32 echo "Nachrichten lesen mit kafkacat"
34 docker-compose -f docker/docker-compose.yml exec cli kafkacat -C -b kafka:9092 -t test -o beginning -e