Search code examples
apache-kafkacommand-line-interfacekafka-consumer-apiconfluent-schema-registry

How to get the embedded schema id from a Kafka message using a CLI tool?


How to get the embedded schema id from a Kafka message using a CLI tool?

I am trying using kcat and I can parse pointing to my Schema Registry, but for debugging purposes, I want to get it in bytes and parse the schema id out of the message.

It is known that the id is in the 1-4 bytes. How can I parse the bytes and extract the id from my own terminal?


Solution

  • kafka-avro-console-consumer --property print.schema.ids=true
    

    https://github.com/confluentinc/schema-registry/pull/901