json - Kafka Topic Message Versioning
问题描述
I publish messages to a kafka topic (outputTopic) in a format which my subscribers can understand. I now wish to modify the format of these messages in a way which will break the existing topic consumers.
For example, I post objects, serialised in json format, but need to change the objects, and therefore the schema.
What is the best way to manage this type of change? Should I alter the producer so that it publishes to a new topic (outputTopic2)? Are there any better ways to manage this?
解决方案
根据我的说法,一种干净的方法是使用Schema registry / Apache Avro。根据您使用它的方式,它将帮助您保证向后/向前兼容性。
推荐阅读
- r - 使用 rvest、xml2 和选择器小工具进行网络抓取会导致 xml_missing
- npgsql - Teiid:Npgsql 不支持弃用的浮点日期/时间格式
- arrays - 如何在 Jolt 的 arraylist 中获取具有特定属性的对象
- php - 使用 strtolower 的口音和 UTf-8 php
- android - 如何使用剪贴板从多个片段中复制文本
- python - 如何使用 Python 从 twitter 推文中删除图片 URL
- c# - ValidationRules 失败时未触发 WPF TextBox IValueConverter ConvertBack
- java - 从 Spring 集成测试运行时,Spring DATA JDBC 无法注入存储库
- python - 将参数传递给 TkInter 帧
- oracle-apex - Oracle Apex 19 - 动态更改页面项模板