Bird
0
0

You want to optimize a Kafka consumer to process large messages efficiently without increasing latency. Which combination of settings is best?

hard📝 Application Q8 of 15
Kafka - Performance Tuning
You want to optimize a Kafka consumer to process large messages efficiently without increasing latency. Which combination of settings is best?
ASet max.poll.records to 1; increase fetch.max.wait.ms.
BDecrease fetch.max.bytes; increase fetch.min.bytes and max.poll.records.
CIncrease fetch.max.bytes and max.poll.records; keep fetch.min.bytes low.
DIncrease fetch.min.bytes and fetch.max.wait.ms; keep max.poll.records moderate.
Step-by-Step Solution
Solution:
  1. Step 1: Understand large message processing needs

    Large messages require waiting for enough data to reduce latency and improve throughput.
  2. Step 2: Evaluate settings for latency and throughput

    Increasing fetch.min.bytes and fetch.max.wait.ms lets consumer wait for larger batches, while moderate max.poll.records avoids processing overload.
  3. Final Answer:

    Increase fetch.min.bytes and fetch.max.wait.ms; keep max.poll.records moderate. -> Option D
  4. Quick Check:

    Wait for bigger batches, moderate record count for efficiency [OK]
Quick Trick: Wait for bigger batches, moderate max.poll.records [OK]
Common Mistakes:
MISTAKES
  • Setting max.poll.records too high causing delays
  • Decreasing fetch.max.bytes limiting batch size
  • Setting max.poll.records to 1 reducing throughput

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes