Bird
0
0

A Kafka producer is configured with batch.size=16384 and linger.ms=50. The producer is not batching messages as expected. What is a likely cause?

medium📝 Debug Q6 of 15
Kafka - Producers
A Kafka producer is configured with batch.size=16384 and linger.ms=50. The producer is not batching messages as expected. What is a likely cause?
Abatch.size is too large causing immediate sends
Blinger.ms is set too low for message arrival rate
CProducer retries are set to zero
DCompression type is set to none
Step-by-Step Solution
Solution:
  1. Step 1: Analyze linger.ms effect on batching

    If linger.ms is too low, producer sends batches quickly without waiting to accumulate messages.
  2. Step 2: Exclude unrelated configs

    Retries and compression do not affect batching timing directly.
  3. Final Answer:

    linger.ms is set too low for message arrival rate -> Option B
  4. Quick Check:

    Low linger.ms causes less batching [OK]
Quick Trick: Low linger.ms reduces batching time window [OK]
Common Mistakes:
  • Blaming batch.size for immediate sends
  • Confusing retries with batching behavior
  • Assuming compression affects batching timing

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes