Kafka - Schema RegistryWhich of the following is the correct way to specify a schema in Kafka using Avro?AUse XML schema files directly in Kafka topics.BWrite a SQL CREATE TABLE statement.CDefine a JSON schema and register it in the Schema Registry.DEmbed schema in Kafka broker configuration files.Check Answer
Step-by-Step SolutionSolution:Step 1: Identify Avro schema usageAvro schemas are JSON-based and registered in Schema Registry for Kafka.Step 2: Eliminate incorrect optionsSQL and XML are not used directly for Kafka schema; broker configs don't hold schemas.Final Answer:Define a JSON schema and register it in the Schema Registry. -> Option CQuick Check:Avro schema format = JSON + Schema Registry [OK]Quick Trick: Avro schemas are JSON registered in Schema Registry [OK]Common Mistakes:MISTAKESConfusing SQL or XML with Avro schema formatThinking schemas are stored in broker configsNot using Schema Registry for schema storage
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