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
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:
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