Bird
0
0

If batch.size is set to 32768 and linger.ms is 10, what is the effect on message sending?

medium📝 Predict Output Q5 of 15
Kafka - Performance Tuning
If batch.size is set to 32768 and linger.ms is 10, what is the effect on message sending?
AMessages are sent only when batch size exceeds 10KB
BMessages are sent when batch reaches 32KB or after 10ms delay
CMessages are sent immediately ignoring batch size and linger.ms
DMessages are sent only after 10ms delay regardless of batch size
Step-by-Step Solution
Solution:
  1. Step 1: Understand batch.size and linger.ms interaction

    batch.size sets max batch size; linger.ms sets max wait time before sending batch.
  2. Step 2: Sending condition

    Producer sends batch when either batch size is reached or linger.ms time passes, whichever comes first.
  3. Final Answer:

    Messages are sent when batch reaches 32KB or after 10ms delay -> Option B
  4. Quick Check:

    batch.size or linger.ms triggers send [OK]
Quick Trick: Batch sends on size or linger.ms timeout [OK]
Common Mistakes:
  • Thinking linger.ms always delays sending
  • Ignoring batch.size limit
  • Assuming immediate sends always

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes