Bird
Raised Fist0

You have this Protobuf schema:

medium📝 Debug Q14 of Q15
Kafka - Schema Registry
You have this Protobuf schema:
message Event {
  string id = 1;
  int32 count = 2;
}

Which of the following is CORRECT about using it with Kafka?
AUsing 'int32' instead of 'integer' causes error
BField numbers must be unique and start from 1
CMissing a root 'schema' keyword causes failure
DField names cannot be strings
Step-by-Step Solution
Solution:
  1. Step 1: Check Protobuf field numbering rules

    Field numbers must be unique and start from 1, which is true here.
  2. Step 2: Identify the correct statement

    Field numbers must be unique and start from 1 correctly describes the field numbering rule. Options B, C, D are incorrect statements.
  3. Final Answer:

    Field numbers must be unique and start from 1 -> Option B
  4. Quick Check:

    Protobuf field numbering rule = A [OK]
Quick Trick: Field numbers must be unique and start at 1 [OK]
Common Mistakes:
MISTAKES
  • Thinking 'int32' is invalid
  • Expecting a 'schema' keyword in Protobuf
  • Confusing field names with types

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes