首页 > 解决方案 > 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?

标签: jsonapache-kafka

解决方案


根据我的说法,一种干净的方法是使用Schema registry / Apache Avro。根据您使用它的方式,它将帮助您保证向后/向前兼容性。


推荐阅读