Search code examples
apache-kafkakafka-producer-apiconfluent-schema-registry

Can I view the id/version number of the schema that is being sent to Kafka? for debugging purpose


I want to view the Id/version of the schema to be referred in a record while publishing data from producer.

If I have 3 versions of schemas and I'm publishing data for the version 1. Can I see the version number before sending the record to kafka?


Solution

  • There is no API to get the schema version number, only the global schema ID (via an HTTP POST to /subjects/:name)

    You would have to scan all /versions of the subject and compare your schema against those.

    Or you can try looking at the logs of the registry / enable trace logging on the registry client in the producer