Bird
Raised Fist0

Which of the following is the correct way to register a schema in Kafka Schema Registry?

easy📝 Syntax Q12 of Q15
Kafka - Schema Registry
Which of the following is the correct way to register a schema in Kafka Schema Registry?
APUT /topics/{topic}/schemas with schema JSON in URL
BGET /schemas/{schemaId} with schema JSON in body
CDELETE /subjects/{subject} with schema JSON in body
DPOST /subjects/{subject}/versions with schema JSON in body
Step-by-Step Solution
Solution:
  1. Step 1: Recall Schema Registry API basics

    To add a new schema version, you POST the schema JSON to /subjects/{subject}/versions.
  2. Step 2: Check other options for correctness

    GET retrieves schemas, DELETE removes subjects, PUT with schema in URL is invalid.
  3. Final Answer:

    POST /subjects/{subject}/versions with schema JSON in body -> Option D
  4. Quick Check:

    Register schema = POST to versions endpoint [OK]
Quick Trick: Register schema by POSTing JSON to subject versions [OK]
Common Mistakes:
MISTAKES
  • Using GET or DELETE to register schemas
  • Putting schema JSON in URL instead of body
  • Confusing topic and subject endpoints

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes