Kafka - Schema RegistryWhich of the following is the correct way to register a schema in Kafka Schema Registry?APUT /topics/{topic}/schemas with schema JSON in URLBGET /schemas/{schemaId} with schema JSON in bodyCDELETE /subjects/{subject} with schema JSON in bodyDPOST /subjects/{subject}/versions with schema JSON in bodyCheck Answer
Step-by-Step SolutionSolution:Step 1: Recall Schema Registry API basicsTo add a new schema version, you POST the schema JSON to /subjects/{subject}/versions.Step 2: Check other options for correctnessGET retrieves schemas, DELETE removes subjects, PUT with schema in URL is invalid.Final Answer:POST /subjects/{subject}/versions with schema JSON in body -> Option DQuick Check:Register schema = POST to versions endpoint [OK]Quick Trick: Register schema by POSTing JSON to subject versions [OK]Common Mistakes:MISTAKESUsing GET or DELETE to register schemasPutting schema JSON in URL instead of bodyConfusing topic and subject endpoints
Master "Schema Registry" in Kafka9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Kafka Quizzes Kafka Connect - Transform and converter chains - Quiz 6medium Kafka Streams - Filter and map operations - Quiz 5medium Kafka Streams - Stream topology - Quiz 5medium Kafka with Java/Python - Python consumer - Quiz 3easy Kafka with Java/Python - Python producer (confluent-kafka) - Quiz 6medium Kafka with Java/Python - Error handling in clients - Quiz 13medium Monitoring and Operations - Log compaction - Quiz 11easy Monitoring and Operations - Log compaction - Quiz 12easy Schema Registry - Schema Registry concept - Quiz 9hard Schema Registry - Schema evolution (backward, forward, full) - Quiz 2easy