From: Kai Moritz Date: Sat, 2 Nov 2024 17:38:18 +0000 (+0100) Subject: Setup mit 3 Konsumern und ein bischen mehr Dampf (`README.sh` angepasst) X-Git-Tag: consumer/spring-consumer--log-compaction--2024-11-13--si~2 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=fdede672f895f050ae40e036d767894631f66f7e;p=demos%2Fkafka%2Ftraining Setup mit 3 Konsumern und ein bischen mehr Dampf (`README.sh` angepasst) --- diff --git a/README.sh b/README.sh index cf72e51..07f7de4 100755 --- a/README.sh +++ b/README.sh @@ -10,7 +10,7 @@ then fi docker compose -f docker/docker-compose.yml up -d --remove-orphans kafka-1 kafka-2 kafka-3 -docker compose -f docker/docker-compose.yml rm -svf consumer +docker compose -f docker/docker-compose.yml rm -svf consumer-1 if [[ $(docker image ls -q $IMAGE) == "" || @@ -27,13 +27,9 @@ docker compose -f docker/docker-compose.yml up --remove-orphans setup || exit 1 docker compose -f docker/docker-compose.yml up -d producer -docker compose -f docker/docker-compose.yml up -d consumer +docker compose -f docker/docker-compose.yml up -d consumer-1 -sleep 5 -docker compose -f docker/docker-compose.yml stop consumer +sleep 10 +docker compose -f docker/docker-compose.yml exec cli http consumer-1:8881/ -docker compose -f docker/docker-compose.yml start consumer -sleep 5 - -docker compose -f docker/docker-compose.yml stop producer consumer -docker compose -f docker/docker-compose.yml logs consumer +docker compose -f docker/docker-compose.yml stop producer consumer-1 diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 4603a26..db8abf6 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -215,14 +215,34 @@ services: juplo.client-id: producer juplo.producer.topic: test juplo.producer.linger-ms: 666 - juplo.producer.throttle-ms: 100 + juplo.producer.throttle-ms: 10 - consumer: + consumer-1: image: juplo/spring-consumer:1.1-log-compaction-SNAPSHOT environment: juplo.bootstrap-server: kafka:9092 - juplo.client-id: consumer + juplo.client-id: consumer-1 juplo.consumer.topic: test + juplo.producer.linger-ms: 1000 + logging.level.de.juplo: TRACE + + consumer-2: + image: juplo/spring-consumer:1.1-log-compaction-SNAPSHOT + environment: + juplo.bootstrap-server: kafka:9092 + juplo.client-id: consumer-2 + juplo.consumer.topic: test + juplo.producer.linger-ms: 1000 + logging.level.de.juplo: TRACE + + consumer-3: + image: juplo/spring-consumer:1.1-log-compaction-SNAPSHOT + environment: + juplo.bootstrap-server: kafka:9092 + juplo.client-id: consumer-3 + juplo.consumer.topic: test + juplo.producer.linger-ms: 1000 + logging.level.de.juplo: TRACE volumes: zookeeper-data: