From e0596905822070c7472428e8482e9633cc851f9b Mon Sep 17 00:00:00 2001 From: Staffan Olsson Date: Tue, 9 Jan 2018 08:34:34 +0100 Subject: [PATCH] Makes producer acks configurable by env The suggested -1 is equivalent to "all", see https://kafka.apache.org/documentation/#producerconfigs --- kafka/test/produce-consume.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kafka/test/produce-consume.yml b/kafka/test/produce-consume.yml index f3a9961e..d0632ab6 100644 --- a/kafka/test/produce-consume.yml +++ b/kafka/test/produce-consume.yml @@ -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 @@ -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