Bird
0
0

Given the following Kafka consumer configuration snippet:

medium📝 Predict Output Q13 of 15
Kafka - Performance Tuning
Given the following Kafka consumer configuration snippet:
props.put("max.poll.records", "1000");
props.put("fetch.min.bytes", "1048576");

What is the expected effect on consumer throughput and latency?
ALower throughput and lower latency
BHigher throughput and lower latency
CNo change in throughput or latency
DHigher throughput with potentially increased latency
Step-by-Step Solution
Solution:
  1. Step 1: Analyze max.poll.records setting

    Setting it to 1000 means the consumer fetches up to 1000 records per poll, increasing batch size and throughput.
  2. Step 2: Analyze fetch.min.bytes setting

    Setting it to 1MB (1048576 bytes) means the consumer waits to fetch at least 1MB of data, which can increase latency waiting for enough data.
  3. Final Answer:

    Higher throughput with potentially increased latency -> Option D
  4. Quick Check:

    Large batch size = higher throughput, bigger fetch.min.bytes = higher latency [OK]
Quick Trick: Large batch size boosts throughput but may add latency [OK]
Common Mistakes:
  • Assuming latency always decreases with throughput
  • Ignoring fetch.min.bytes impact
  • Confusing max.poll.records with fetch.max.bytes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes