Skip to content

Commit 53f355a

Browse files
committed
Adds a key to each message, while testing ...
for regressions with https://github.com/solsson/kafkacat/tree/fixedkey
1 parent 2cc7021 commit 53f355a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/basic-with-kafkacat.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ data:
2020
2121
UNIQUE="${HOSTNAME}@$(date -u -Ins)"
2222
23-
echo "Test $UNIQUE" >> /shared/produce.tmp
23+
echo "${UNIQUE: -41:5}:Test $UNIQUE" >> /shared/produce.tmp
2424
sleep $PC_WAIT
2525
LAST=$(tail -n 1 /shared/consumed.tmp)
2626
@@ -112,7 +112,7 @@ spec:
112112
spec:
113113
containers:
114114
- name: producer
115-
image: solsson/kafkacat@sha256:ebebf47061300b14a4b4c2e1e4303ab29f65e4b95d34af1b14bb8f7ec6da7cef
115+
image: solsson/kafkacat-fixedkey@sha256:c9c78aef3090519b64ecc279c06df6914c94720a27469200c079f1871b10fa8f
116116
env:
117117
- name: BOOTSTRAP
118118
value: kafka-0.broker.kafka.svc.cluster.local:9092
@@ -123,7 +123,7 @@ spec:
123123
echo "--- start $HOSTNAME $(date --iso-8601='ns' -u) ---" >> /shared/produce.tmp
124124
;
125125
tail -f /shared/produce.tmp |
126-
kafkacat -P -b $BOOTSTRAP -t test-basic-with-kafkacat -v -T -d broker
126+
kafkacat -P -b $BOOTSTRAP -t test-basic-with-kafkacat -v -T -d broker -K ':'
127127
;
128128
volumeMounts:
129129
- name: config
@@ -139,7 +139,7 @@ spec:
139139
- /bin/bash
140140
- -cex
141141
- >
142-
kafkacat -C -b $BOOTSTRAP -t test-basic-with-kafkacat -o -1 -f '%T;%p;%o;%s\n' -u -d broker |
142+
kafkacat -C -b $BOOTSTRAP -t test-basic-with-kafkacat -o -1 -f '%T;%k:%p;%o;%s\n' -u -d broker |
143143
tee /shared/consumed.tmp
144144
;
145145
volumeMounts:

0 commit comments

Comments
 (0)