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.
fixes: #427
fixes: #452
SpecMesh already allows schema owned by other domains to be referenced by schema owned by the domain. When encountered, such non-owned schema are ignored, i.e. to attempt is made to register them. However, dependent schemas will fail to register if the non-owned schema is not already registered.
What was not supported till now, was a channel directly referencing a non-owned schema. What is called a 'topic schema' in the code. In this instance, the schema needs to be registered against the appropriate
${topic.name}-key
or${topic.name}-value
subject, otherwise things won't work.As the schema isn't owned by the domain, it can't just register the schema. Instead, it first ensures the schema is already registered under a subject name that matches its fully qualified name. For an avro schema the FQ name is
${schema.namespace}.${schema.name}
Only if the non-owned schema has already been registered under the correct name can will the schema also be associated with the topic's key or value by registering the non-owned schema against the appropriate
${topic.name}-key
or${topic.name}-value
subject.