docker-compose -f docker/docker-compose.yml up -d producer
while ! [[ $(http 0:8080/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for producer..."; sleep 1; done
-docker-compose -f docker/docker-compose.yml up -d peter klaus
-
-sleep 10
-docker-compose -f docker/docker-compose.yml stop 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/toolbox
- command: kafkacat -C -b kafka:9092 -t test -o 0 -f'p=%p|o=%o|k=%k|v=%s\n'