Kcat and protobuf mesages

Hi all…

We all know kafkacat which has now been renamed kcat.
we also have a move avro specific version of this…

What do we have for Protobuf, even with below command I get those binary bits in my messages printed.

docker exec -t kafkacat \
  kcat \
  -b broker:29092 \
  -t pb_salescompleted1 \
  -C -J
  -s value=json \
  -r http://schema-registry:8081 \
  | jq '.payload'

See this kcat issue on decoding protobuf. There are some suggestions to pipe to protoc.

Another option is the kafka-protobuf-console-consumer tool that is included in the Confluent Platform Schema Registry image.

1 Like

thank you, will give it a look.
would be nice to get this wrapped into a packaged kcat bin for protob

G

so tried.

kafka-protobuf-console-consumer --topic pb_salesbaskets --bootstrap-server localhost:9092 | jq

but it fails out.
if i run without |jq it just outputs the message as a long string…
strangely the params as part of the bin <> the GitHub site

G