简体   繁体   English

Avro模式版本控制

[英]Avro schema versioning

Sorry this is a beginner AVRO question. 抱歉,这是AVRO的初学者问题。

My Java microservice takes a payload request which has a schema version element, there can be a number of different versions of that payload each with a slightly different format. 我的Java微服务接受一个具有模式版本元素的有效负载请求,该有效负载可以有许多不同的版本,每个版本的格式略有不同。 Is it possible to do a lookup against the AVRO schema registry using that version number then use that schema to validate the received payload. 是否可以使用该版本号对AVRO模式注册表进行查找,然后使用该模式来验证接收到的有效负载。

Is this a valid and possible AVRO use case? 这是有效且可能的AVRO用例吗?

The intention then is to process this data in the Java microservice some more before sending on-wards. 然后的目的是在发送之前进一步在Java微服务中处理此数据。

Maybe AVRO is not the correct technology, but please advise if otherwise. 也许AVRO不是正确的技术,但如果不是,请提出建议。

lookup against the AVRO schema registry using that version number 使用该版本号对AVRO模式注册表进行查找

The Avro schema ID in the registry is an incrementing number, not something which your data is really indexable by. 注册表中的Avro架构ID是一个递增的数字,而不是您的数据真正可用于编制索引的数字。

I think what you're looking for is just a version ID, which the Confluent Avro Schema Registry supports by 我认为您正在寻找的只是版本ID,Confluent Avro Schema Registry通过以下方式支持该版本ID:

GET /subjects/:name/versions/:id

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM