kcat icon indicating copy to clipboard operation
kcat copied to clipboard

kafkacat is removing \0 when producing to a topic via pipe.

Open 4j4y opened this issue 6 years ago • 6 comments

I am consuming from a topic using Kafkacat and piping it to Kafkacat which produces to a different topic.If the consumed msg contains NUL char at the end, it is getting removed while producing.

Sample Message

nulltest.txt

Scenario

cat nulltest.txt | kafkacat -P -b localhost:9092 -t charon_test -D '' | kafkacat -C -b localhost:9092 -t charon_test -o -1 -c 1 -D '' | protoc --decode_raw

Output

Failed to parse input.

Expected Output

serialized proto message

4j4y avatar Apr 20 '18 09:04 4j4y