0

I'm using kcat to check the content of kafka topics when working locally but, when messages are serialized with protobuf, the result I get is an unreadable stream of encoded characters. I'm aware of the existence of some other kafka-consumers tools (Kafdrop, AKHQ, Kowl, Kadek...) but I'm looking for the simplest option which fits my needs.

Does kcat support protobuf key/value deserialization from protofile?
Is there any simple terminal-based tool which allows this?

frblazquez
  • 115
  • 1
  • 10

2 Answers2

1

I've had luck with this command:

% kcat -C -t <topic> -b <kafkahost>:9092 -o -1 -e -q -D "" | protoc --decode=<full message class> path/to/my.proto --proto_path <proto_parent_folder>
James
  • 270
  • 1
  • 10
0

any simple terminal-based tool which allows this

Only ones that integrate with the Confluent Schema Registry (which is what those linked tools use as well), e.g. kafka-protobuf-console-consumer is already part of Confluent Platform.

Regarding kcat - refer https://github.com/edenhill/kcat/issues/72 and linked issues

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245