WIP
authorKai Moritz <kai@juplo.de>
Wed, 10 Apr 2024 06:01:15 +0000 (08:01 +0200)
committerKai Moritz <kai@juplo.de>
Wed, 10 Apr 2024 06:01:15 +0000 (08:01 +0200)
docker/docker-compose.yml

index ad376ae..f441881 100644 (file)
@@ -245,7 +245,7 @@ services:
           kafka-topics --bootstrap-server kafka:9091 \
                        --create \
                        --topic test \
-                       --partitions 1 \
+                       --partitions 3 \
                        --replication-factor 3 \
                        --config min.insync.replicas=2 \
           && echo Das Topic \'test\' wurde erfolgreich angelegt: \
@@ -322,17 +322,11 @@ services:
       - bash
       - -c
       - |
-        kafka-producer-perf-test \
+        kafka-consumer-perf-test \
+          --bootstrap-server kafka:9091 \
           --topic test \
-          --num-records 1000000 \
-          --record-size 100 \
-          --throughput -1 \
-          --producer.config /tmp/client.properties \
-          --producer-props \
-            acks=all \
-            bootstrap.servers=kafka:9092 \
-            buffer.memory=67108864 \
-            batch.size=128000
+          --group consumer-1 \
+          --consumer.config /tmp/client.properties
     volumes:
       - ./u1.properties:/tmp/client.properties
 
@@ -342,20 +336,28 @@ services:
       - bash
       - -c
       - |
-        kafka-producer-perf-test \
+        kafka-consumer-perf-test \
+          --bootstrap-server kafka:9091 \
           --topic test \
-          --num-records 1000000 \
-          --record-size 100 \
-          --throughput -1 \
-          --producer.config /tmp/client.properties \
-          --producer-props \
-            acks=all \
-            bootstrap.servers=kafka:9092 \
-            buffer.memory=67108864 \
-            batch.size=128000
+          --group consumer-1 \
+          --consumer.config /tmp/client.properties
     volumes:
       - ./u2.properties:/tmp/client.properties
 
+  u3:
+    image: juplo/toolbox
+    command:
+      - bash
+      - -c
+      - |
+        kafka-consumer-perf-test \
+          --bootstrap-server kafka:9091 \
+          --topic test \
+          --group consumer-1 \
+          --consumer.config /tmp/client.properties
+    volumes:
+      - ./u3.properties:/tmp/client.properties
+
 volumes:
   zookeeper-data:
   zookeeper-log: