Replies: 2 comments
-
I am not all that familiar with this code, but as far as I can see you can use contentIds or globalIds. The line in the else refers to when there is not a globalId, so added a content orientated header - which seems reasonable. I have not tested this, but this looks like the intent. |
Beta Was this translation helpful? Give feedback.
-
hi @robobario, you make a good point. Every artifact version in the Registry has a globalID, so when a schema is resolved, the globalID should be available. However, when you resolve schema only by contentId or contentHash, the GAV or globalID is not available, because the same content may be referenced by multiple versions, and you don't have other data to decide which one. So the header must contain contentHash. The code is probably more complex that it needs be, so I don't immediately see how to make this happen, but I believe this is the reason. |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm working on a Kafka proxy and I'm investigating intercepting messages with Apicurio headers to validate they refer to a live schema. I have a question about the Header writing code.
I can see this code path in the the DefaultHeadersHandler when the Serde is configured to use global ids, and the global id on the ArtifactReference is null. In this case we write out group/artifactId headers and version/contentHash headers if they are present in the reference. When would this case occur? When would global id be null at header writing time?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions