Kafka MCQs – Kafka Schema Registry (Avro Support)

11.) Which Kafka client library supports Avro serialization with Schema Registry?

A) kafka-console-producer
B) kafka-python
C) kafka-avro-serializer
D) kafka-streams

Answer: Option C

Explanation: Confluent’s serializers integrate with Schema Registry and support Avro.

12.) What happens when an incompatible schema is submitted to Schema Registry?

A) It is auto-corrected
B) Schema is rejected
C) A warning is logged
D) The system reboots

Answer: Option B

Explanation: Schema Registry enforces compatibility rules and rejects incompatible schemas.

13.) What REST method is used to register a new schema in Schema Registry?

A) GET
B) DELETE
C) PUT
D) POST

Answer: Option D

Explanation: Schemas are registered via POST /subjects/{subject}/versions.

14.) Which compatibility types are supported by Schema Registry?

A) None
B) Backward, Forward, Full
C) All of the above
D) Binary

Answer: Option C

Explanation: Schema Registry supports none, backward, forward, and full compatibility.

15.) How can you list all registered subjects in Schema Registry?

A) GET /subjects
B) GET /topics
C) GET /records
D) POST /list

Answer: Option A

Explanation: This endpoint lists all the subjects stored in the Schema Registry.

16.) Which field of the Avro schema defines the name of the record?

A) title
B) key
C) name
D) schema_name

Answer: Option C

Explanation: name defines the name of the record in the Avro schema.

17.) How are schemas stored in Schema Registry?

A) In ZooKeeper
B) In JSON files
C) In memory only
D) In Kafka internal topics

Answer: Option D

Explanation: Schemas are stored in _schemas topic in Kafka.

18.) What is the default compatibility setting in Schema Registry?

A) Forward
B) Backward
C) Full
D) None

Answer: Option B

Explanation: Schema Registry’s default compatibility mode is BACKWARD.

19.) What tool can you use to test Avro serialization and schema registration?

A) kafka-avro-console-consumer
B) zookeeper-shell
C) kafka-metadata-shell
D) kafka-streams-topology

Answer: Option A

Explanation: This tool helps test Avro data reading with Schema Registry.

20.) Which Avro data type allows a field to be optional?

A) string
B) boolean
C) union with null
D) optional string

Answer: Option C

Explanation: Optional fields are defined using a union of null and another type.

Leave a Reply

Your email address will not be published. Required fields are marked *