-
Notifications
You must be signed in to change notification settings - Fork 624
ConfluentSchemaRegistryClient picks wrong subject version when using SpecificRecord types #3103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Milestone
Comments
For reference, using this code (Kotlin, sorry) to replace the linked code above does the job
|
@palmski Thanks for the report. That seems like an issue. Are you willing to send a PR to fix this issue? If so, please do it; we will gladly review it. Thanks! |
palmski
pushed a commit
to palmski/spring-cloud-stream
that referenced
this issue
Apr 8, 2025
Fix the retrieval of the schema version registered on serializing an Avro message with the ConfluentSchemaRegistryClient
@sobychacko #3107 raised Sorry it took so long, getting the build running within our corporate network has been... challenging :) |
palmski
pushed a commit
to palmski/spring-cloud-stream
that referenced
this issue
Apr 8, 2025
Fix the retrieval of the schema version registered on serializing an Avro message with the ConfluentSchemaRegistryClient Signed-off-by: Andy Palmer <[email protected]>
olegz
pushed a commit
that referenced
this issue
Apr 8, 2025
…zing an Avro message with the ConfluentSchemaRegistryClient Signed-off-by: Andy Palmer <[email protected]> Resolves #3103
olegz
pushed a commit
that referenced
this issue
Apr 8, 2025
…zing an Avro message with the ConfluentSchemaRegistryClient Signed-off-by: Andy Palmer <[email protected]> Resolves #3103 Resolves #3107
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the issue
ConfluentSchemaRegistryClient picks wrong subject version when serialising a message if the schema registry has a newer version of the schema registered. This results in the wrong version being encoded in the ContentType header as calculated here https://github.com/spring-cloud/spring-cloud-stream/blob/main/schema-registry/spring-cloud-stream-schema-registry-client/src/main/java/org/springframework/cloud/stream/schema/registry/client/ConfluentSchemaRegistryClient.java#L103-L111
To Reproduce
Steps to reproduce the behavior:
Version of the framework
4.2.0
Expected behavior
When registering the schema on sending the event the schema registry client should not assume that the most recent subject version is being used, but should instead take the ID returned from the POST to
"/subjects/" + subject + "/versions"
and invoke https://docs.confluent.io/platform/current/schema-registry/develop/api.html#get--schemas-ids-int-%20id-versions to fetch the correct versionThe text was updated successfully, but these errors were encountered: