You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given two events both called MyEvent that are records with the namespaces org.foo.events and org.bar.events, the expected behaviour would be to successfully decode a message matching org.bar.events if the respective codec was present in the union. However it fails as altMatching only seems picks up the first matching event in the union chain, which in this case would be the codec for org.foo.events.
Just want to check if this is indeed unexpected behaviour in vulcan, and what the behaviour should be - should both codecs be tested given the event or can altMatching be modified to match on the canonical name of the schema?
Happy to explain more if I haven't been clear here.
The text was updated successfully, but these errors were encountered:
Yes, I think the current behaviour is wrong. It's really an artifact of how we build on top of the Apache Avro java SDK, which loses information during decoding. What happens is that Avro unions themselves are tagged (they begin with a number field indicating which union member they contain) but the Avro SDK converts them to an untagged union, so we have to use various heuristics to work out which union member we have decoded.
Not matching by namespace is, at least superficially, correct, as name matches only require the unqualified name, not the fullname, to match. However I think we should try to match on fullname first and then fall back to unqualified name if that fails - certainly we should try all alternatives with the same unqualified name before raising an error.
Given two events both called
MyEvent
that are records with the namespacesorg.foo.events
andorg.bar.events
, the expected behaviour would be to successfully decode a message matchingorg.bar.events
if the respective codec was present in the union. However it fails asaltMatching
only seems picks up the first matching event in the union chain, which in this case would be the codec fororg.foo.events
.Just want to check if this is indeed unexpected behaviour in vulcan, and what the behaviour should be - should both codecs be tested given the event or can
altMatching
be modified to match on the canonical name of the schema?Happy to explain more if I haven't been clear here.
The text was updated successfully, but these errors were encountered: