sr: add support for schema guid#1358
Open
kaiwenleee wants to merge 1 commit into
Open
Conversation
twmb
reviewed
Jul 2, 2026
| ID int `json:"id,omitempty"` | ||
|
|
||
| // GUID is the globally unique ID of the schema used in Kafka header. | ||
| GUID string `json:"guid,omitempty"` |
Owner
There was a problem hiding this comment.
Both this and the ID above are doc'd as "the globally unique ID of the schema", so it's hard to tell them apart. I suggest changing this to:
// GUID is the globally unique string identifier of the schema,
// carried in the Kafka record header rather than the payload
// prefix. Introduced in Confluent Platform 8.x.
while also changing the doc on ID above to:
// ID is the unique numeric identifier of the schema within the registry.
Owner
|
I've built on top of your PR in #1361, I'll go ahead with that one and close this (your commit is the first in that new branch, I just covered a few other API surfaces that were not implemented and found when auditing this). |
Author
|
Thank you :D |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Confluent 8.x introduced Schema GUID, which is another schema identifier to be used in message header instead of payload prefix.
I'd like to add basic support for this new field in schema registry client:
SubjectSchemastructGET /schemas/guids/{guid}Reference:
https://www.confluent.io/blog/schema-id-kafka-headers-data-governance/
https://docs.confluent.io/platform/current/schema-registry/develop/api.html#get-schema-by-guid