Bird
0
0

You want to send complex nested data with schema evolution support in Kafka. Which serialization method should you choose and why?

hard📝 Application Q15 of 15
Kafka - Producers
You want to send complex nested data with schema evolution support in Kafka. Which serialization method should you choose and why?
AByteArray serialization, because it handles any data type
BJSON serialization, because it supports nested data and is human-readable
CString serialization, because it is simple and fast
DAvro serialization, because it supports schema evolution and compact binary format
Step-by-Step Solution
Solution:
  1. Step 1: Understand requirements for nested data and schema evolution

    Complex nested data needs a format that supports schemas and changes over time.
  2. Step 2: Compare serialization options

    String is simple but no schema support; JSON supports nested but no schema evolution; Avro supports both schema evolution and compact binary format.
  3. Final Answer:

    Avro serialization, because it supports schema evolution and compact binary format -> Option D
  4. Quick Check:

    Schema evolution + nested data = Avro [OK]
Quick Trick: Avro supports schema evolution and nested data best [OK]
Common Mistakes:
  • Choosing String for complex data
  • Assuming JSON supports schema evolution
  • Using ByteArray without schema control

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes