Bird
0
0

In a Kafka producer using Avro serialization, what error is expected if the schema.registry.url property is missing from the configuration?

medium📝 Debug Q6 of 15
Kafka - Producers
In a Kafka producer using Avro serialization, what error is expected if the schema.registry.url property is missing from the configuration?
AA runtime exception indicating failure to connect to the schema registry
BMessages will be serialized as plain JSON without schema validation
CThe producer will silently send messages without any serialization
DThe Kafka broker will reject the messages due to missing schema
Step-by-Step Solution
Solution:
  1. Step 1: Understand Avro serialization requirements

    Avro serialization in Kafka requires a schema registry URL to fetch and register schemas.
  2. Step 2: Missing schema.registry.url effect

    If the URL is missing, the Avro serializer cannot connect to the schema registry, causing a runtime exception.
  3. Final Answer:

    A runtime exception indicating failure to connect to the schema registry -> Option A
  4. Quick Check:

    Missing schema registry URL causes connection error [OK]
Quick Trick: Avro needs schema registry URL to serialize [OK]
Common Mistakes:
  • Assuming messages will be serialized as JSON without schema
  • Believing the producer sends messages without serialization
  • Thinking Kafka broker rejects messages due to missing schema

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes