Open sbillet opened 3 years ago
I've written a small CLI in Rust to do just this with a similar interface to kcat
. It's called milena and it supports consuming/decoding and producing/encoding protobuf kafka messages to and from JSON for ease of use
protosaurus can automatically deserialize the output of kcat
using the corresponding protos from a schema registry:
kcat -C -e -F <kafka.config> -t <topic> -f "%o\\n%k\\n%R%s" | protosaurus - --schema-registry <url>
First of all, thank you for providing this immensely useful tool!
Here comes a feature request.
Since April 2020 the Confluent Kafka platform has "first-class citizen" support of Protobuf protocol and schemas in all components (source). Producing/consuming data and the interaction with the Schema Registry works in the same transparent way as for Avro format.
It would be fantastic if kafkacat could provide the same native support for consuming Protobuf messages as for Avro messages.
With that feature, it should be possible to write
and get the topic messages printed nicely because Kafkacat got the schema from the registry and did the deserializing.
This would be much nicer for manual interaction than having to pipe the output to protoc as described in #72