From 061fcde1c8d74912149dfbbd7b19d311d9f29718 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sun, 29 Jan 2023 17:05:22 +0100 Subject: [PATCH] =?utf8?q?Tags=20f=C3=BCr=20die=20=C3=9Cbung=20erg=C3=A4nz?= =?utf8?q?t?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- README.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.sh b/README.sh index b0b9604..76ed9c3 100755 --- a/README.sh +++ b/README.sh @@ -29,8 +29,10 @@ while ! [[ $(http 0:8000/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Wait 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 @@ -39,8 +41,9 @@ docker-compose logs consumer 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 @@ -55,5 +58,7 @@ echo -n Nachricht 4 an Producer 1 | http -v :8001/bar 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[] -- 2.20.1