Hacker News new | ask | show | jobs
by mrburton 2686 days ago
We're using Avro + Kafka's Registry. We try to append to our messages to keep backwards compatibility.

That being said, there are things we intentionally do to ensure we can support this. e.g, Allow for nullable properties.

We pass in the message type, version, and additional headers. It's fairly common to create an envelope around the actual message. I would also suggest consider doing this for a few reasons. Skipping the obvious benefits, there's one powerful benefit in adding meta data to messages without having to alter the actual event. e.g, security tokens, time to live, and more.

I'm sure this might be also fairly commonly known, but I would highly recommend adding information like request correlation information.

1 comments

Thanks for sharing.

> We try to append to our messages to keep backwards compatibility.

Do you additionally do versioning, or do you solve it by only allowing backwards compatible changes such as appending to the message?

We do - that's how Kafka Registry knows what schema to apply for the Avro message. If you like, you can ping me at my username + gmail and I can answer any other questions about what you're doing.