Bird
Raised Fist0

You want to ensure that your Kafka producer only sends messages that strictly follow the latest schema version and rejects any older schema versions. Which configuration or approach should you use?

hard🚀 Application Q8 of Q15
Kafka - Schema Registry
You want to ensure that your Kafka producer only sends messages that strictly follow the latest schema version and rejects any older schema versions. Which configuration or approach should you use?
AUse the latest schema version ID explicitly in the producer and enable validation
BSet the compatibility level in the schema registry to 'BACKWARD' and enable schema validation in the producer
CSet the compatibility level to 'NONE' and disable schema validation
DConfigure the producer to ignore schema versions and send raw data
Step-by-Step Solution
Solution:
  1. Step 1: Understand schema version enforcement

    To strictly enforce latest schema, the producer must specify the latest schema version explicitly.
  2. Step 2: Analyze options

    Use the latest schema version ID explicitly in the producer and enable validation correctly describes using the latest schema version ID with validation; others either relax validation or disable it.
  3. Final Answer:

    Use the latest schema version ID explicitly in the producer and enable validation -> Option A
  4. Quick Check:

    Explicit latest schema version enforces strict validation [OK]
Quick Trick: Specify latest schema version ID in producer for strict validation [OK]
Common Mistakes:
MISTAKES
  • Relying only on compatibility level without producer control
  • Disabling validation to avoid errors
  • Ignoring schema versions in producer

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes