Hi Everyone,
I am working with Debezium MySQL Connector and Confluent's Schema Registry and AvroConverter. I'd like to use the schema version of Kafka Connect records in my custom Kafka Connect extensions (e.g. transformations, partitioners).
The version that schema registry provides would be perfect for this and in theory I could access it from my code like connectRecord.valueSchema().version(). Unfortunately, what I see there, is a constant the value of 1, even after schema changes.
I've looked into the code of both Confluent and Debezium and it seems that while schema registry version would be available, it gets preceded by the version that a source connector - in this case Debezium - provides*. Which makes sense in general. It seems though that the version Debezium provides at this moment is the hardcoded value of 1.**
While I think it's okay if Debezium cannot propagate a schema version (sure it would be great, if it did :)), wouldn't it make more sense if it would just leave the version empty (rather than filling it with a hardcoded value), and let AvroConverter defer to the schema registry version instead?
(According to Kafka Connect javadoc Schema's version attribute is optional, so it would be acceptable to leave it as null.***)
I am happy to submit a Jira issue and merge request with this change, if this approach makes sense to you, but I'm also open to alternative suggestions to make the schema versions work.
(Please mind that I'm pretty new to both Debezium and Kafka Connect, so I may not see full picture.)
Thank you,
David