From: Kai Moritz Date: Sun, 3 Apr 2022 10:55:58 +0000 (+0200) Subject: Setup für die Übung "linger-ms" X-Git-Tag: linger-ms-DEPRECATED~4 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=72dcf6fd8a7eccbc41cd89dec5e11e17f9be0323;p=demos%2Fkafka%2Ftraining Setup für die Übung "linger-ms" --- diff --git a/README.sh b/README.sh index f651155..20ccf79 100755 --- a/README.sh +++ b/README.sh @@ -25,9 +25,39 @@ fi echo "Waiting for the Kafka-Cluster to become ready..." docker-compose exec cli cub kafka-ready -b kafka:9092 1 60 > /dev/null 2>&1 || exit 1 docker-compose up setup -docker-compose up -d +docker-compose up -d producer -sleep 15 +sleep 10 +echo "Sennding message to :8080/foo..." +time echo foo | http -v :8080/foo +docker-compose up -d -docker-compose stop producer consumer +sleep 1 +echo "Sennding message to :8080/foo..." +time echo foo | http -v :8080/foo +sleep 1 +echo "Sennding message to :8080/foo..." +time echo foo | http -v :8080/foo +sleep 1 +echo "Sennding message to :8080/foo..." +time echo foo | http -v :8080/foo +sleep 1 +echo "Sennding message to :8080/foo..." +time echo foo | http -v :8080/foo +sleep 1 +echo "Sennding message to :8080/foo..." +time echo foo | http -v :8080/foo +sleep 1 +echo "Sennding message to :8080/foo..." +time echo foo | http -v :8080/foo +sleep 1 +echo "Sennding message to :8080/foo..." +time echo foo | http -v :8080/foo +sleep 1 +echo "Sennding message to :8080/foo..." +time echo foo | http -v :8080/foo + +http -v :8000/seen + +docker-compose stop diff --git a/docker-compose.yml b/docker-compose.yml index 336c459..28a8a7b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,7 +29,7 @@ services: command: > bash -c " kafka-topics --bootstrap-server kafka:9092 --delete --if-exists --topic test - kafka-topics --bootstrap-server kafka:9092 --create --topic test --partitions 2 + kafka-topics --bootstrap-server kafka:9092 --create --topic test --partitions 1 " cli: @@ -44,11 +44,63 @@ services: producer.bootstrap-server: kafka:9092 producer.client-id: producer producer.topic: test + producer.batch-size: 16384 + producer.linger-ms: 5000 + + peter: + image: juplo/rest-client:1.0-SNAPSHOT + ports: + - 8081:8080 + environment: + server.port: 8080 + rest-client.baseUrl: http://producer:8080 + rest-client.username: peter + rest-client.throttle-ms: 1 + + klaus: + image: juplo/rest-client:1.0-SNAPSHOT + ports: + - 8082:8080 + environment: + server.port: 8080 + rest-client.baseUrl: http://producer:8080 + rest-client.username: klaus + rest-client.throttle-ms: 1 + + beate: + image: juplo/rest-client:1.0-SNAPSHOT + ports: + - 8083:8080 + environment: + server.port: 8080 + rest-client.baseUrl: http://producer:8080 + rest-client.username: beate + rest-client.throttle-ms: 1 + + franz: + image: juplo/rest-client:1.0-SNAPSHOT + ports: + - 8084:8080 + environment: + server.port: 8080 + rest-client.baseUrl: http://producer:8080 + rest-client.username: franz + rest-client.throttle-ms: 1 + + uschi: + image: juplo/rest-client:1.0-SNAPSHOT + ports: + - 8085:8080 + environment: + server.port: 8080 + rest-client.baseUrl: http://producer:8080 + rest-client.username: uschi + rest-client.throttle-ms: 1 consumer: image: juplo/counting-consumer:1.0-SNAPSHOT ports: - - 8081:8081 + - 8000:8081 environment: consumer.bootstrap-server: kafka:9092 consumer.client-id: my-group