Skip to content

Commit

Permalink
Makes producer acks configurable by env
Browse files Browse the repository at this point in the history
The suggested -1 is equivalent to "all", see
https://kafka.apache.org/documentation/#producerconfigs
  • Loading branch information
solsson committed Jan 9, 2018
1 parent e50b8ea commit e059690
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kafka/test/produce-consume.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ spec:
env:
- name: BOOTSTRAP
value: bootstrap.kafka:9092
- name: ACKS
# -1 means use brokers' min.insync.replicas
value: "-1"
command:
- /bin/bash
- -cex
Expand All @@ -83,7 +86,7 @@ spec:
./bin/kafka-topics.sh --zookeeper zookeeper.kafka:2181 --describe --topic test-produce-consume
;
tail -f /shared/produce.tmp |
./bin/kafka-console-producer.sh --broker-list $BOOTSTRAP --topic test-produce-consume
./bin/kafka-console-producer.sh --broker-list $BOOTSTRAP --topic test-produce-consume --producer-property "acks=$ACKS"
;
volumeMounts:
- name: config
Expand Down

0 comments on commit e059690

Please sign in to comment.