examples icon indicating copy to clipboard operation
examples copied to clipboard

Examples Should Avoid Using Schema Registry for Keys

Open chuck-confluent opened this issue 5 years ago • 3 comments

I don't think it's commonly understood by new learners that using Schema Registry for keys is bad practice (see this internal confluent slack convo ). For example, if you reorder fields, it will break partitioning. Also protobuf and json schemas don't serialize deterministically, so using those formats for keys will also break partitioning.

This python example uses Avro for the key Name and it probably shouldn't.

chuck-confluent avatar Oct 01 '20 17:10 chuck-confluent

Hello Chuck,

We don't have access to the confluent slack convo, is there a public documentation about it to prevent the users to keep this bad practice ?

I'm also surprised that some tools like Conduktor don't make a friendly warning about this practice.

Mcfloy avatar Sep 13 '21 07:09 Mcfloy

I'll make a forum thread on this over in forum.confluent.io as well as raise an issue with our docs team. I'll keep you posted!

chuck-confluent avatar Sep 13 '21 15:09 chuck-confluent

Made forum post: https://forum.confluent.io/t/partitioning-gotchas-dont-use-avro-json-or-protobuf-for-keys-and-be-aware-of-client-hashing-differences/2718

I also filed an issue with the docs team to be more opinionated about these things

chuck-confluent avatar Sep 13 '21 15:09 chuck-confluent