2

I'm a newbie in schema registry in Kafka, but I cannot realize what's the difference between kafka-value and kafka-key in schema registry? I registered a new topic: test Now, if I make a request to /subjects I have:

  • test
  • test-value So my question:
  1. what the difference between them? If I wanted to update schema I have to update key or value?
  2. why I need key with schema and different versions and value with a different version?
  3. why in control center key for shcema is empty?
OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Oleg L
  • 161
  • 1
  • 14

1 Answers1

3

Kafka message can have headers, key, payload... the key and the payload (value) can have schemas, they are maintained in different "subject" the topic-key is for schemas for the key, the topic-value is for the schemas of the payload

Ran Lupovich
  • 1,655
  • 1
  • 6
  • 13
  • hmm. And what if I use avro schema? what is the key in this? – Oleg L Jul 13 '21 at 16:29
  • 1
    Same... the key and value (payload) can have different types, you might be not using / producing key to the records at all... it is valid use case... think of key:value pairs , the key can be string while the value be AVRO or vice-versa. – Ran Lupovich Jul 13 '21 at 16:36