Bird
Raised Fist0

If a Kafka consumer expects JSON Schema but receives a Protobuf message, what is the likely outcome?

medium📝 Predict Output Q5 of Q15
Kafka - Schema Registry
If a Kafka consumer expects JSON Schema but receives a Protobuf message, what is the likely outcome?
AConsumer processes message as plain text
BConsumer automatically converts Protobuf to JSON
CConsumer ignores the message silently
DConsumer fails to deserialize and throws an error
Step-by-Step Solution
Solution:
  1. Step 1: Understand schema mismatch impact

    If consumer expects JSON Schema but gets Protobuf, it cannot parse the binary format correctly.
  2. Step 2: Identify typical consumer behavior

    Consumer throws deserialization error due to incompatible formats.
  3. Final Answer:

    Consumer fails to deserialize and throws an error -> Option D
  4. Quick Check:

    Schema mismatch causes deserialization error [OK]
Quick Trick: Schema mismatch causes deserialization failure [OK]
Common Mistakes:
MISTAKES
  • Assuming automatic format conversion
  • Thinking consumer ignores message silently
  • Believing message is processed as text

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes