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