Skip to content

Commit e059690

Browse files
committed
Makes producer acks configurable by env
The suggested -1 is equivalent to "all", see https://kafka.apache.org/documentation/#producerconfigs
1 parent e50b8ea commit e059690

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kafka/test/produce-consume.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ spec:
7474
env:
7575
- name: BOOTSTRAP
7676
value: bootstrap.kafka:9092
77+
- name: ACKS
78+
# -1 means use brokers' min.insync.replicas
79+
value: "-1"
7780
command:
7881
- /bin/bash
7982
- -cex
@@ -83,7 +86,7 @@ spec:
8386
./bin/kafka-topics.sh --zookeeper zookeeper.kafka:2181 --describe --topic test-produce-consume
8487
;
8588
tail -f /shared/produce.tmp |
86-
./bin/kafka-console-producer.sh --broker-list $BOOTSTRAP --topic test-produce-consume
89+
./bin/kafka-console-producer.sh --broker-list $BOOTSTRAP --topic test-produce-consume --producer-property "acks=$ACKS"
8790
;
8891
volumeMounts:
8992
- name: config

0 commit comments

Comments
 (0)