while ! [[ $(http 0:8001/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for producer-1..."; sleep 1; done
docker-compose up -d consumer
+# tag::http[]
echo -n Nachricht 1 an Producer 0 | http -v :8000/foo
echo -n Nachricht 1 an Producer 1 | http -v :8001/foo
+# end::http[]
echo -n Nachricht 2 an Producer 0 | http -v :8000/bar
echo -n Nachricht 2 an Producer 1 | http -v :8001/bar
docker-compose exec -T cli bash << 'EOF'
echo "Altering number of partitions from 3 to 7..."
kafka-topics --bootstrap-server kafka:9092 --describe --topic test
-kafka-topics --bootstrap-server kafka:9092 --describe --topic test
+# tag::repartitioning[]
kafka-topics --bootstrap-server kafka:9092 --alter --topic test --partitions 7
+# end::repartitioning[]
kafka-topics --bootstrap-server kafka:9092 --describe --topic test
EOF
docker-compose logs consumer
+# tag::kafkacat[]
kafkacat -b :9092 -t test -o 0 -p0 -f'p=%p|o=%o|k=%k|v=%s\n' -qe
kafkacat -b :9092 -t test -o 0 -p1 -f'p=%p|o=%o|k=%k|v=%s\n' -qe
+# end::kafkacat[]