Bird
0
0

Given this Kafka producer config:

medium📝 Predict Output Q4 of 15
Kafka - Performance Tuning
Given this Kafka producer config:
{"batch.size": 32768, "linger.ms": 20}

What is the expected effect on message sending?
AMessages are compressed before sending
BMessages are sent in larger batches with a slight delay
CBatch size is ignored and messages send one by one
DMessages are sent immediately without batching
Step-by-Step Solution
Solution:
  1. Step 1: Understand batch.size effect

    Batch size sets max bytes per batch; larger means more messages grouped.
  2. Step 2: Understand linger.ms effect

    Linger.ms adds delay to wait for more messages before sending batch.
  3. Final Answer:

    Messages are sent in larger batches with a slight delay -> Option B
  4. Quick Check:

    Batch size + linger.ms effect = D [OK]
Quick Trick: Batch size + linger.ms controls batch sending timing [OK]
Common Mistakes:
  • Assuming messages send immediately
  • Ignoring linger.ms delay
  • Confusing batch size with compression

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes