while ! [[ $(http 0:8080/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for producer..."; sleep 1; done
-docker-compose up -d peter klaus
-
-sleep 10
-docker-compose kill -s9 peter klaus
+echo -n 3 | http -v :8080/foo;
# tag::kafkacat[]
kafkacat -b :9092 -t test -o 0 -e -f 'p=%p|o=%o|k=%k|h=%h|v=%s\n'
producer.bootstrap-server: kafka:9092
producer.client-id: producer
producer.topic: test
-
- peter:
- image: juplo/toolbox
- command: >
- bash -c "
- while [[ true ]];
- do
- echo 777 | http -v producer:8080/peter;
- sleep 1;
- done
- "
-
- klaus:
- image: juplo/toolbox
- command: >
- bash -c "
- while [[ true ]];
- do
- echo 666 | http -v producer:8080/klaus;
- sleep 1;
- done
- "
-
- consumer:
- image: juplo/simple-consumer:1.0-SNAPSHOT
- command: kafka:9092 test my-group consumer